m
→Code: efficiency?
m (catfix) |
m (→Code: efficiency?) |
||
| Line 41: | Line 41: | ||
<!-- Paste your function(s) here. Make sure to prefix each line with at least one space. You may want to replace some troublesome characters with HTML entities when necessary, e.g. "<" becomes <, etc.. --> | <!-- Paste your function(s) here. Make sure to prefix each line with at least one space. You may want to replace some troublesome characters with HTML entities when necessary, e.g. "<" becomes <, etc.. --> | ||
local output = {} | |||
function {{PAGENAME}}(order, ...) | function {{PAGENAME}}(order, ...) | ||
output = wipe(output) | |||
order = tostring(order) | order = tostring(order) | ||
for i=1, strlen(order) do | for i=1, strlen(order) do | ||
local value = select(tonumber(strsub(order, i, i), ...) | local value = select(tonumber(strsub(order, i, i)), ...) | ||
if value ~= nil then | if value ~= nil then | ||
table.insert(output, value) | table.insert(output, value) | ||
| Line 51: | Line 52: | ||
end | end | ||
return unpack(output) | return unpack(output) | ||
end | end | ||
__NOTOC__ | __NOTOC__ | ||
[[Category:User defined functions]] | [[Category:User defined functions]] | ||