NSString *str = @"";
int count = 10;
for (int i = 0; i < count; i ++) {
if (i+1 == count) {
str = [str stringByAppendingString:[NSString stringWithFormat:@"%d",i]];
} else {
str = [str stringByAppendingString:[NSString stringWithFormat:@"%d,",i]];
}
}
NSLog(@"str ======= %@",str);