此模块的文档可以在模块:StringUtils/doc创建
local p = {}
function p.split_or_empty(value, sep)
if value and #value > 0 then
return mw.text.split(value, sep)
else
return {}
end
end
function p.assert_not_empty(s)
if s and #s == 0 then
return nil
else
return s
end
end
return p