I have tokenized an NSString into an NSMutable Array. I can then use an NSSortDescriptor to sort that array by the length of its strings. Then I can perform methods on certain words starting from the longest.
This is where my problem surfaces. I now need to restore the original sort order of the array so that I can run the array back into an edited string.
My answer is essentially like Steve’s except that I’d do it the other way around — keep the original array, create a sorted copy of that, step through the sorted copy doing your processing and then throw it away. So, e.g.