I am new to iPhone development (using iOS 5) and I am trying to replace : with spaces in an NSMutableString. I have been struggling with this since an hour and it forces me to use
replaceOccurrencesOfString:@":" withString:@" " options:nil range:; (I thought I could use it without options and range). I have tried almost everything (especially for the range parameter) but it keeps complaining about various stuff such as bad receiver type.
Any suggestions about how to achieve this?
This is how you invoke replaceOccurrencesOfString: to produce the desired effect:
[myString replaceOccurrencesOfString:@":"
withString:@" "
options:NSLiteralSearch
range:NSMakeRange(0, myString.length)];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With