モジュール:Format
表示
モジュールの解説[作成]
local Format = {}
function toarray(table)
local values = {}
for key,value in pairs(table) do
key = tonumber(key)
if key then
values[key] = value
end
end
return values
end
function Format.format (frame)
return string.format (unpack (toarray (frame.args)))
end
function Format.sub (frame)
return tostring (string.sub (unpack (toarray (frame.args))))
end
function Format.gsub (frame)
return tostring (string.gsub (unpack (toarray (frame.args))))
end
function Format.rep (frame)
return string.rep (unpack (toarray (frame.args)))
end
return Format