Module:Sandbox/Jackmcbarn: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
build name sorter
Jackmcbarn (talk | contribs)
handle first names too
Line 15:
local listEntries = split(list, '\n')
table.sort(listEntries, function(a,b)
returnlocal aWords, bWords = split(a, ' ')[2]<, split(b, ' ')[2]
return (aWords[2] .. aWords[1]) < (bWords[2] .. bWords[1])
end)
return table.concat(listEntries, '\n')