/*---------------------------切分数组------------------------------*/
//从字符串分割到数组- componentsSeparatedByString:
NSString *string = [NSString alloc] initWithString:@"One,Two,Three,Four"];
NSLog(@"string:%@",string);
NSArray *array = [string componentsSeparatedByString:@","];
NSLog(@"array:%@",array);
[string release];
//从数组合并元素到字符串- componentsJoinedByString:
NSArray *array = [NSArray alloc] initWithObjects:@"One",@"Two",@"Three",@"Four",nil];
NSString *string = [array componentsJoinedByString:@","];
NSLog(@"string:%@",string);
其余的见:http://www.cocoachina.com/newbie/tutorial/2010/1009/2151.html