-- Module test for splitting strings by some substring parsed
local p =
function p.split(frame) local text = frame.args.text or frame.args[1] local sep = frame.args.sep or frame.args[2] local nreturn = tonumber(frame.args.nreturn) or tonumber(frame.args[3]) local out = local count = 1 local from = 1 local sep_from, sep_to = string.find(text, sep, from) while sep_from do if count
nreturn then return string.sub(text, from) endend
return p