Module:String2: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
function nowiki
(suppress second value from gsub())
(function nowiki)
Line 91:
s = string.gsub( s, "%d+", n, 1 )
return s
end
 
-- nowiki ensures that a string of text is treated by the MediaWiki software as just a string
-- it takes an unnamed parameter and trims whitespace, then removes any wikicode
p.nowiki = function(frame)
local str = mw.text.trim(frame.args[1] or "")
return mw.text.nowiki(str)
end
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu