#import "NSString+fanZhuan.h"
@implementation NSString (fanZhuan)
+(NSString *)fanZhuan:(NSString *)str{
unsigned long len;
len = [str length];
unichar a[len];
for(int i = 0; i < len; i++)
{
unichar c = [str characterAtIndex:len-i-1];
a[i] = c;
}
NSString *str1=[NSString stringWithCharacters:a length:len];
return str1;
}
@end |
|