componentsSeparatedByString
将字符串切割成数组
- (void)viewDidLoad
{
NSString *a = [[NSString alloc] initWithString : @"apple,banana,pear" ];
NSArray *b = [a componentsSeparatedByString:@","];
NSString *a3 = [b objectAtIndex:2];
NSLog(@"\n b是: %@", a3);
}