NSString *s=text.text;
int i=[s length];
NSMutableString *arr=[[NSMutableString alloc]initWithCapacity:i];
for ( int j=i-1; j>=0; j--) {
[arr appendString:[NSString stringWithFormat:@"%c",[s characterAtIndex:j]]];
}
NSLog(@"%@",arr);
No comments:
Post a Comment