删除就用
- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;
将@“[:1:]"”,替换成@“”
分割就用
- (NSArray *)componentsSeparatedByString:(NSString *)separator;
根据你选定分割符拆分字符串
IOS字符串按特定字符拆分成数组
NSString * fruits = @"apple,pair,banana,orange";
NSArray * array= [fruits componentsSeparatedByString:@","];
按指定格式的子字符串,删除和分割字符串,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/clumsy1006/p/3824552.html