Jump to content

Module:Ustring

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Codehydro (talk | contribs) at 15:59, 11 May 2017 (super simple module to use mw.ustring library). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

p = {}

for k, v in pairs(mw.ustring) do
	p[k] = function(frame)
		local args = {}
		for _, v in ipairs(frame.args) do
			table.insert(args, tonumber(v) or string.gsub(string.gsub(string.gsub(v,"\\\\",string.char(127,4,127,2)), "\\", ""), string.char(127,4,127,2), "\\"))
		end
		return mw.ustring[k](unpack(args))
	end
end

return p