<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.holdfastgame.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AUstring%2Fdoc</id>
	<title>Module:Ustring/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.holdfastgame.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AUstring%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.holdfastgame.com/index.php?title=Module:Ustring/doc&amp;action=history"/>
	<updated>2026-05-30T20:17:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.holdfastgame.com/index.php?title=Module:Ustring/doc&amp;diff=1166&amp;oldid=prev</id>
		<title>Falo at 15:11, 22 August 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.holdfastgame.com/index.php?title=Module:Ustring/doc&amp;diff=1166&amp;oldid=prev"/>
		<updated>2019-08-22T15:11:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:11, 22 August 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Module rating |release&amp;lt;!-- Values:  pre-alpha â¢ alpha â¢ beta â¢ release â¢ protected  --  If a rating not needed/relevant, delete this template call --&amp;gt;}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This module directly imports all functions from the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{luaref|&lt;/del&gt;mw.ustring&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}} &lt;/del&gt;library. Documentation for each function can be found there.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This module directly imports all functions from the mw.ustring library. Documentation for each function can be found there.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module takes an indefinite number of arguments. All arguments are coerced as number type if possible. If you wish for something to remain a string, you can simply escape it by insert &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt; at the beginning of the string.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module takes an indefinite number of arguments. All arguments are coerced as number type if possible. If you wish for something to remain a string, you can simply escape it by insert &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt; at the beginning of the string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can also wrap results in tags. All non-number indexed arguments will be passed to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{luaref|&lt;/del&gt;frame:extensionTag&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can also wrap results in tags. All non-number indexed arguments will be passed to frame:extensionTag&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Usage ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Usage ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|''function_name''|arg1|arg2|...}}&amp;lt;/code&amp;gt; is equivalent to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{luaref|&lt;/del&gt;mw.ustring|mw.ustring.function_name|args=arg1, arg2, ...&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|''function_name''|arg1|arg2|...}}&amp;lt;/code&amp;gt; is equivalent to mw.ustring|mw.ustring.function_name|args=arg1, arg2, ...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Example using mw.ustring.sub===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Example using mw.ustring.sub===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Falo</name></author>
	</entry>
	<entry>
		<id>https://wiki.holdfastgame.com/index.php?title=Module:Ustring/doc&amp;diff=880&amp;oldid=prev</id>
		<title>Falo: Initial transfer from Wikipedia</title>
		<link rel="alternate" type="text/html" href="https://wiki.holdfastgame.com/index.php?title=Module:Ustring/doc&amp;diff=880&amp;oldid=prev"/>
		<updated>2019-08-16T14:42:16Z</updated>

		<summary type="html">&lt;p&gt;Initial transfer from Wikipedia&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating |release&amp;lt;!-- Values:  pre-alpha â¢ alpha â¢ beta â¢ release â¢ protected  --  If a rating not needed/relevant, delete this template call --&amp;gt;}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
This module directly imports all functions from the {{luaref|mw.ustring}} library. Documentation for each function can be found there.&lt;br /&gt;
&lt;br /&gt;
The module takes an indefinite number of arguments. All arguments are coerced as number type if possible. If you wish for something to remain a string, you can simply escape it by insert &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt; at the beginning of the string.&lt;br /&gt;
&lt;br /&gt;
You can also wrap results in tags. All non-number indexed arguments will be passed to {{luaref|frame:extensionTag}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|''function_name''|arg1|arg2|...}}&amp;lt;/code&amp;gt; is equivalent to {{luaref|mw.ustring|mw.ustring.function_name|args=arg1, arg2, ...}}&lt;br /&gt;
&lt;br /&gt;
===Example using mw.ustring.sub===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Ustring|sub|abcde|2|4}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Ustring|sub|abcde|2|4}}&lt;br /&gt;
&lt;br /&gt;
===Example using mw.ustring.gsub===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Ustring|gsub|1234|23|}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Ustring|gsub|1234|23|}}&lt;br /&gt;
&lt;br /&gt;
===Example using mw.ustring.char===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;amp;amp;amp;#{{#invoke:ustring|char|49|48|59}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;amp;#{{#invoke:ustring|char|49|48|59}}&lt;br /&gt;
&lt;br /&gt;
This is nice for escaping character sequences in other modules; for example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
  local str = '1-2-2{{#invoke:ustring|char|45}}1-3'&lt;br /&gt;
  return frame:preprocess(str:gsub('-', '/'))-- == '1/2/2-1/3'&lt;br /&gt;
end&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example using mw.ustring.match===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Ustring|match|abcde|(c%w)}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Ustring|match|abcde|(c%w)}}&lt;br /&gt;
&lt;br /&gt;
Note: Only the first match is returned. Additional returns are omitted because mw.ustring.gsub's second return value is generally undesirable.&lt;br /&gt;
&lt;br /&gt;
===Example using tag arguments===&lt;br /&gt;
&amp;lt;pre&amp;gt;{{#invoke:Ustring|match&lt;br /&gt;
|{{Module:Ustring}}|%s%sif.+%&lt;br /&gt;
&amp;lt;!--enter an actual newline character to match '\n'--&amp;gt;%s%send&lt;br /&gt;
|tag=syntaxhighlight|lang=lua}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
{{#invoke:Ustring|match&lt;br /&gt;
|{{Module:Ustring}}|%s%sif.+%&lt;br /&gt;
&amp;lt;!--enter an actual newline character to match '\n'--&amp;gt;%s%send&lt;br /&gt;
|tag=syntaxhighlight|lang=lua}}&lt;br /&gt;
&lt;br /&gt;
Note that:&lt;br /&gt;
{{#tag:pre|&amp;lt;nowiki&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;{{#invoke:Ustring|match&lt;br /&gt;
|{{Module:Ustring}}|%s%sif.+%&lt;br /&gt;
&amp;lt;!--enter an actual newline character to match '\n'--&amp;gt;%s%send}}&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
produces:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;{{#invoke:Ustring|match&lt;br /&gt;
|{{Module:Ustring}}|%s%sif.+%&lt;br /&gt;
&amp;lt;!--enter an actual newline character to match '\n'--&amp;gt;%s%send}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Falo</name></author>
	</entry>
</feed>