I have a long string of some characters. I want to replace some chars with other chars.
For example
string1="Hello WORLD12";
string2="world";
string1= search string2 in string1 and replace it;
//need this method in objective c
string1="Hello world12";
Use
NSRangeto grab the replacing string and then usestringByReplacingOccurrencesOfStringfunction to replace the characters in string.