This could be handy for identifying anagrams, for example.
% join [lsort [split abacab {}]] {} aaabbc
For case-insensitivity:
% join [lsort [split [string tolower PaTeD] {}]] {} adept
To return just the set of characters used:
% join [lsort -unique [split [string tolower Mississippi] {}]] {} imps
No comments:
Post a Comment