Alphabetically order a list?
If I have a string that is a list of commands (or any kind of strings for that matter) separated by spaces, for example, like:
"/jill /bob /foo /ahhh /bomb /picklesurprise"
Is there a function, or one that can easily be made, to reorganize it alphabetically, so that the above becomes:
"/ahhh /bob /bomb /jill /picklesurprise"
? Or is it possible to do this if the list is in some other kind of format?
"/jill /bob /foo /ahhh /bomb /picklesurprise"
Is there a function, or one that can easily be made, to reorganize it alphabetically, so that the above becomes:
"/ahhh /bob /bomb /jill /picklesurprise"
? Or is it possible to do this if the list is in some other kind of format?
Comments
Here's a quick (not heavily tested) function that should do the trick for you.