NSString * str = @"beijing huan ying nin";
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];
NSLog(@"--- 反转之后的字符串 ----%@",str1);
网友评论