跳转到内容

模組:Example/sandbox

维基百科,自由的百科全书

这是本页的一个历史版本,由Vozhuo留言 | 贡献2018年12月7日 (五) 13:39 (// Edit via Wikiplus)编辑。这可能和当前版本存在着巨大的差异。

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