2
Answers

Doubt in String.Replace()

Ask a question
deepak

deepak

16y
2.9k
1

halo guys,

i have a code like this,

String s="Deepak is working in ACSL";

s.Replace("acsl","Prodigy");

when i execute the above code the "ACSL" in String "s" is not getting replaced with Prodigy.Only when i do like below it gets replaced.

s.Replace("ACSL","Prodigy");

Also

s.Contains("AcSl")

returns false

But how to achieve  the previous one.

Kindlly help me in achieving  this.

All replies are appreciated


Answers (2)