无标题文章

IOS字符串翻转

- (NSString *)reverseAStringWithOriginalString:(NSString *)originalString{

NSMutableString *lastString = [[NSMutableString alloc] init];

for (NSUInteger i = originalString.length ; i>0;i--) {

[lastString appendString:[originalString substringWithRange:NSMakeRange(i-1, 1)]];

}

return lastString;

}

你可能感兴趣的:(无标题文章)