NSArray *arr1 = @[@"fsafdddaaghadfaa",@"qegwf",@"gfas按时飒飒",@"fsafaa",@"干啥看法",@"爱上了咖啡来看;SJ;DAKSADJ KJ;KJHF收发货的很快就会",@" 手机",@"沙发课件上",@"fsafaa",@"fsafaa",@"奥斯卡价格",@"沙发看就看;JSASJBkjsdkjhf空间发课件课件撒",@"爱帅哥和水电费了速度快解放了"];
NSMutableArray *arr2 = [NSMutableArray array];
for (int i = 0; i < arr1.count; i++) {
NSString *arrString = [NSString stringWithFormat:@"%@",arr1[i]];
if (arrString.length <= 10) {
[arr2 addObject:arrString];
}else{
[arr2 addObject:[arrString substringToIndex:10]];
}
}
NSLog(@"数组:%@",arr2);