1.  首页
  2.  博客
  3. objective-c 添加与删除字符

objective-c 添加与删除字符


objective-c  中实现对 NSString 添加字符,删除字符的操作:

//添加字符串
NSString testString = [[NSString alloc] init];
testString = [col stringByAppendingFormat:@"test"];
//删除字符串
testString = [testString substringToIndex:testString.length -1];

评论 0