标签: objective-c
如何从NSMutableString中删除最后一个字符?
答案 0 :(得分:135)
您可以使用deleteCharactersInRange:
NSMutableString *str = [NSMutableString stringWithString:@"FooBarx"]; [str deleteCharactersInRange:NSMakeRange([str length]-1, 1)];