I'm relatively new to Objective C and I'm trying to figure out how to efficiently replace a character in a string in the case that I know the index where that character would be.
Basically if S is my string I would like to be able to do this s[i] = 'n' for some i
But this looks quite expensive to me:
NSRange range = NSMakeRange(0,1);
NSString *newString = [S stringByReplacingCharactersInRange:range withString:@"n"];
Is it not ??