Module:Sandbox/RexxS/Textsplit
< Module:Sandbox | RexxS
--[[ Demonstrating the mw.text.split function --]]
local p = {}
function p.split(frame)
local txt = frame.args.txt or ""
local pids = {}
if txt ~= "" then
pids = mw.text.split(txt, "[, ]+")
end
local out = ">" .. table.concat(pids, "<<br>>") .. "<<br>Items: " .. #pids
return out
end
return p