Well, you have discovered my simple solution
better to use regex.split("",word) and then list.sort(true)
I still recommend my library, it also has other useful functions
as @LucaMs says uselessFollowing on from the @LucaMs example, by adding a word length column, you can use a where clause to ignore words of the wrong length. Also index the Length and Sorted Letters column to get a faster response.
getbyte is no good, there are letters that in UTF8 use 2 bytes and others even 4B4X:Private Sub SortLetters(Letters As String) As String Dim Result As String Dim lstLetters As List lstLetters.initialise Dim bytChars() As Byte = Letters.GetBytes("UTF8") For i = 0 To bytChars.Length - 1 lstLetters.Add(bytChars(i)) Next lstLetters.Sort(True) For i = 0 To lstLetters.Size - 1 Result = Result & Chr(lstLetters.Get(i)) Next Return result End Sub
better to use regex.split("",word) and then list.sort(true)
I still recommend my library, it also has other useful functions