Module:User:Erutuon/string sorting

local words = {}

local function make_words(words, start_cp, end_cp) local i = 0 for cp = start_cp, end_cp do		i = i + 1 str = '' for cp = cp, cp + 5 do str = str .. mw.ustring.char(cp) end words[i] = str end end local function show local output = {} local i = 0 function output.add(...) i = i + 1 output[i] = table.concat({...}, "\t") -- like print or mw.log end function show(word1, word2) output.add(word1, " < ", word2, ":", tostring(word1 < word2)) end for i = 1, #words - 1 do		local word1, word2 = words[i], words[i + 1] show(word1, word2) word1, word2 = word2, word1 show(word1, word2) end return table.concat(output, " ") end