I have a string in iphone that looks like the following one:
my.whatever.string.with.unknown.length=something whatever something = something .... = whatever
I want to replace only the FIRST “=” with something else.
If I use :
[myString stringByReplacingOccurrencesOfString:@"=" withString:@"somethingHere" ];
It will replace all occurences of “=” . Any suggestions on how to achieve this?
You can use the range argument to specify how far into the string you want it to search. Assuming you can find where the first
=is, you can use that to do it. The method definition looks like this: