Difference between revisions of "Module:SandboxShortCode"

From PKC
Jump to navigation Jump to search
(Created page with "local p = {} ustring = require('ustring') function p.byte() return ';byte\n:mw.ustring.byte(\'张\') is ' .. mw.ustring.byte("张") .. '\n' end")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
-- aString Some examples for punctuation:<, >, \\ // ' " .. ...
function p.greek_letter()
ustring = require('ustring')
cf = mw.getCurrentFrame()
-- aString = "<h1>\\" .. mw.allToString(cf.args[1]) .. "</h1>"
function p.byte()
str = mw.getCurrentFrame().args[1]
    return ';byte\n:mw.ustring.byte(\'张\') is ' .. mw.ustring.byte("") .. '\n'
aString = cf:preprocess("firstStr"..str.."secondStr")
return aString
end
end

Latest revision as of 06:52, 11 January 2022

Documentation for this module may be created at Module:SandboxShortCode/doc

-- aString Some examples for punctuation:<, >, \\ // ' " .. ...
function p.greek_letter()
	cf = mw.getCurrentFrame()
	-- aString = "<h1>\\" .. mw.allToString(cf.args[1]) .. "</h1>"
	str = mw.getCurrentFrame().args[1]
	aString = cf:preprocess("firstStr"..str.."secondStr")
	return aString
end