I\'m trying to re-arrange words into alphabetical order. For example, tomato would become amoott, or stack would become ackst.
I\'ve found some methods to do this in
I think separate the string to an array of string(each string in the array contains only one char from the original string). Then sort the array will be OK. This is not efficient but is enough when the string is not very long. I've tested the code.
NSString *str = @"stack";
NSMutableArray *charArray = [NSMutableArray arrayWithCapacity:str.length];
for (int i=0; i