nicknames = {
"Mike",
"John",
"Lenny",
"Ariel",
"Yngwie",
}
function sortByNameReverse(tableToSort)
table.sort(tableToSort, function(a, b) return a > b end)
end
sortByNameReverse(nicknames)
for i, v in pairs(nicknames) do
print(i, v)
end
Saturday, May 12, 2012
table.sort 를 이용한 reverse sort
Labels:
Lua
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment