iOS开发 切割字符串为数组
2020-07-14 本文已影响0人
隔墙送来秋千影
NSString *currentStr =@"0.1112,0.2223,0.3334,0.4445,0.5556";
//按照,分隔成数组
NSArray *currentArr = [currentStr componentsSeparatedByString:@","];
NSLog(@" 结果是currentArr=%@", currentArr);
NSString *currentStr =@"0.1112,0.2223,0.3334,0.4445,0.5556";
//按照,分隔成数组
NSArray *currentArr = [currentStr componentsSeparatedByString:@","];
NSLog(@" 结果是currentArr=%@", currentArr);