Module:String2: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(update from sandbox - merge in strip function from module:stringfunc) |
(catch nil parameter when passed and gracefully return an empty string rather than an error message) |
||
Line 2: | Line 2: | ||
p.trim = function(frame) |
p.trim = function(frame) |
||
local s = mw.text.trim(frame.args[1]) |
local s = mw.text.trim(frame.args[1] or "") |
||
return s |
return s |
||
end |
end |