NSString * str = @"i love you";
NSMutableString * reverseString = [NSMutableString string];
for(int i = 0 ; i < str.length; i ++){
//倒序读取字符并且存到可变数组数组中
unichar c = [str characterAtIndex:str.length- i -1];
[reverseString appendFormat:@"%c",c];
}
str = reverseString;
网友评论