#import <Foundation/Foundation.h>
#define NSLog(FORMAT, ...) printf("%s ", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSMutableString *mustr=[[NSMutableString alloc]init];
int i=123456789;
NSString *stringInt = [NSString stringWithFormat:@"%d",i];
mustr=[NSMutableString stringWithString:stringInt];
NSMutableArray *arr=[[NSMutableArray alloc]init];
NSRange rang;
for (int j=mustr.length-1; j+1 != nil; j--) {
rang.location=j;
rang.length=1;
NSString *newStr3=[mustr substringWithRange:rang];
//NSLog(@"%@",newStr3);
[arr addObject:newStr3];
}
NSLog(@"输出结果为:");
for(NSDictionary *dic in arr){
NSLog(@"%@",dic);
}
}
return 0;
}