NSString *newStr =@"sdfdfs15dfdfdjksjdksllks1233";
NSMutableArray *temps = [NSMutableArray array];
for(inti =0; i < [newStrlength]; i++)
{
[tempsaddObject:[newStr substringWithRange:NSMakeRange(i,1)]];
}
NSLog(@"temps ==== %@",temps);
NSString *newStr =@"sdfdfs15dfdfdjksjdksllks1233";
NSMutableArray *temps = [NSMutableArray array];
for(inti =0; i < [newStrlength]; i++)
{
[tempsaddObject:[newStr substringWithRange:NSMakeRange(i,1)]];
}
NSLog(@"temps ==== %@",temps);
本文标题:iOS 遍历字符串得到每一个字并存入数组中
本文链接:https://www.haomeiwen.com/subject/gpokbftx.html
网友评论