NSMutableString *mutableStr =
[[NSMutableString alloc] initWithFormat:@"蓝鸥科技有限公司"];
NSMutableString *mutableStr1 =
[NSMutableString stringWithFormat:@"蓝鸥科技有限公司"];
//拼接字符串
[mutableStr appendString:@".txt"];
NSLog(@"%@",
mutableStr);
//插入
[mutableStr1 insertString:@"3G" atIndex:2];
NSLog(@"%@",
mutableStr1);
//删除
[mutableStr1 deleteCharactersInRange:NSMakeRange(2, 2)];
NSLog(@"%@", mutableStr1);
可变字符串NSMutableString,布布扣,bubuko.com
时间: 2024-10-18 06:05:50