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);
本文标题:iOS开发 切割字符串为数组
本文链接:https://www.haomeiwen.com/subject/rsmxhktx.html
网友评论