NSMutableString繼承自NSStringcode
插入字符串
繼承
NSMutableSring *str = [NSMutableString stringWithString:@"abc"]; [str insertString:@"def" atIndex:0];
刪除字符串字符串
NSMutableSring *str = [NSMutableString stringWithString:@"abc"]; [str deleteCharactersInRage:NSMakeRage(1,2)];
替換字符串string
NSMutableSring *str = [NSMutableString stringWithString:@"abc"]; [str replaceCharactersInRage:NSMakeRage(1,2) withString:@"def"];