If you want to change the string, you should use NSMutableString instead of NSString . There is no such need if you want to create a string from scratch.
For example, you can use the +stringWithFormat: method +stringWithFormat:
NSString * myString = [NSString stringWithFormat:@"%c %@ %c %@ %c", 0x01, @"Hello", 0x02, @"World", 0x03];
mouviciel
source share