1+2+3:4+5+6:7+8+9
如果我有两个分隔符+和如何分隔: 我正在使用数组来存储
myarray1 = [myarray2 componentsSeparatedByString:@":"]; delimit only :
答案 0 :(得分:4)
NSString *myString = @"Foo-bar/blee";
NSArray *myWords = [myString componentsSeparatedByCharactersInSet:
[NSCharacterSet characterSetWithCharactersInString:@"-/"]
];