-
(NSString*)reverseString:(NSString*)string
{
NSMutableString
*reversedString;
int
length = [string length];
reversedString
= [NSMutableString
stringWithCapacity:length];
while
(length--)
{
[reversedString
appendFormat:@"%C",
[string characterAtIndex:length]];
}
return
reversedString;
}
No comments:
Post a Comment