Difference between revisions of "Module talk:SandboxUString"

From PKC
Jump to navigation Jump to search
Line 12: Line 12:


==Random Wiki Text==
==Random Wiki Text==
  <nowiki>{{#invoke:luaSourceCodeText|{{:Demo:SampleWikiCode}}}}</nowiki>
  <nowiki>{{#invoke:htmlSourceCodeText|{{:Demo:SampleWikiCode}}}}</nowiki>
{{#invoke:SandboxUString|luaSourceCodeText|{{:Demo:SampleWikiCode}}}}
{{#invoke:SandboxUString|htmlSourceCodeText|{{:Demo:SampleWikiCode}}}}


=More Tests=
=More Tests=

Revision as of 11:54, 11 January 2022

The number of characters is:291

Show Code Test

{{#invoke:SandboxUString|showCode}}

/*^ABCDabc&-left&-right/*^D

luaSourceCodeText Test

{{#invoke:luaSourceCodeText|{{:Module:SandboxShortCode}}}}
-- 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
end69

Random Wiki Text

{{#invoke:htmlSourceCodeText|{{:Demo:SampleWikiCode}}}}
='"`UNIQ--h-3--QINU`"'Title=
Demo Wiki Content

='"`UNIQ--h-4--QINU`"'Use of HTML=
<DIV><H1>H1 TITLE</H1></DIV>


=='"`UNIQ--h-5--QINU`"'Use of Level2==
<DIV><H2>H2 TITLE</H2></DIV>61

More Tests

byte
mw.ustring.byte('\') is 92
char
mw.ustring.char(92) is \
byte
mw.ustring.codepoint('张') is 24352
byte
mw.ustring.char(24352) is 张