Difference between revisions of "Module:SB Infobox Begin"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
local getArgs = require('Module:Arguments').getArgs | local getArgs = require('Module:Arguments').getArgs | ||
local p = {} | local p = {} | ||
function p.main(frame) | function p.main(frame) | ||
local args = getArgs(frame) | local args = getArgs(frame) | ||
return p._main(args) | return p._main(args) | ||
end | end | ||
Line 40: | Line 10: | ||
local output = "" | local output = "" | ||
local n = 0 | local n = 0 | ||
for _ in ipairs(args) do n=_ | for _ in ipairs(args) do | ||
n=_ | |||
end | |||
local t = {} | |||
for i=1,n do | |||
t[i] = tostring(args[i]) | |||
end | |||
return table.concat(t,"") | return table.concat(t,"") | ||
end | end | ||
return p | return p |
Revision as of 02:44, 26 May 2021
Documentation for this module may be created at Module:SB Infobox Begin/doc
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
function p._main(args)
local output = ""
local n = 0
for _ in ipairs(args) do
n=_
end
local t = {}
for i=1,n do
t[i] = tostring(args[i])
end
return table.concat(t,"")
end
return p