There are really two options;
Since NSString is read-only, you need to call mutableCopy
on the NSString to get an NSMutableString that can actually be changed, then call replaceCharactersInRange:withString:
on the NSMutableString to replace the characters in it. This is more efficient if you want to change the string more than once.
There is also a stringByReplacingCharactersInRange:withString:
method on NSString that returns a new NSString with the characters replaced. This may be more efficient for a single change, but requires you to create a new NSString for each replacement.