RogerDodger (talk | contribs) (add trim) |
RogerDodger (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
local s = frame.args[1] | local s = frame.args[1] | ||
return s:lower() | return s:lower() | ||
end | |||
p.match = function(frame) | |||
local s = frame.args[1] | |||
return s:match(frame.args[2], frame.args[3], frame.args[4]) | |||
end | end | ||
Latest revision as of 14:24, 3 March 2024
Documentation for this module may be created at Module:String/doc
local p = {};
p.lc = function(frame)
local s = frame.args[1]
return s:lower()
end
p.match = function(frame)
local s = frame.args[1]
return s:match(frame.args[2], frame.args[3], frame.args[4])
end
p.rep = function(frame)
local s = frame.args[1]
local n = frame.args[2]
return s:rep(n)
end
p.trim = function(frame)
local s = frame.args[1]
return mw.text.trim(s)
end
return p