Module:Ustring/doc: Difference between revisions

Content deleted Content added
See also: cat and see also from Module:String
Example using mw.ustring.char: Remove example as it does not look like the sort of code to encourage
Line 31:
 
&#{{#invoke:ustring|char|49|48|59}}
 
This is nice for escaping character sequences in other modules; for example:
<syntaxhighlight lang="lua">
p = {}
function p.main(frame)
local str = '1-2-2{{#invoke:ustring|char|45}}1-3'
return frame:preprocess(str:gsub('-', '/'))-- == '1/2/2-1/3'
end
return p
</syntaxhighlight>
 
===Example using mw.ustring.match===