模組:Example/sandbox
外观
![]() | 这是Module:Example(差异)的沙盒。 |
local p = {}
local getArgs = require("Module:Arguments").getArgs
local data = mw.loadData("Module:ISO 3166/data/National")
--[[----------S T R I P----------]]-- -- Removes junk from the input
function p.strip(text)
text = mw.ustring.gsub(text,"%W","") -- Remove non alpha-numeric
return text
end
--[[----------P . C A L L S T R I P ---------]]-- -- Calls P.strip but using Module:Arguments
function p.callstrip(frame)
local args = getArgs(frame)
return p.strip(args[1]) or ""
end
return p