User Comments for the tutorial:

Replace Character in String

Total comments: 3      View Tutorial    Discuss: Replace Character in String



dif bwString.replace(ch,ch)&String.replace(str,str
String aStr = "Hello"; if (aStr.replace('H','H') == "Hello") When we execute this particular above statement.This Returns True. if (aStr.replace("H","H") == "Hello") When Yu Know I execute this Its not returning true,its the other way its 

replacing an array of string
I want to know how to replace a character more than one. for example. alphabet from a-z then you'll change all of that into a symbol. could that be possible? Thanks. 

using string tokenizer
string s1="one\two\three"; how convert to string like "one/two/three" 

Related Tutorial and Articles