<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ASprintfexpr%2Fdoc</id>
	<title>Template:Sprintfexpr/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ASprintfexpr%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Sprintfexpr/doc&amp;action=history"/>
	<updated>2026-06-19T06:46:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Template:Sprintfexpr/doc&amp;diff=37820&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;{{Documentation}} {{invokes|sprintf}} A subtemplate of Template:Sprintf, that only takes one argument and automatically uses &lt;code&gt;#expr&lt;/code&gt; on it.  Provides access to the lua [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format string.format] function.  ==Usage== &lt;pre&gt;{{Sprintfexpr|format string|param}}&lt;/pre&gt;  The format string is specified according to [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#stri...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Template:Sprintfexpr/doc&amp;diff=37820&amp;oldid=prev"/>
		<updated>2024-10-16T23:47:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation}} {{invokes|sprintf}} A subtemplate of &lt;a href=&quot;/w/Template:Sprintf&quot; title=&quot;Template:Sprintf&quot;&gt;Template:Sprintf&lt;/a&gt;, that only takes one argument and automatically uses &amp;lt;code&amp;gt;#expr&amp;lt;/code&amp;gt; on it.  Provides access to the lua [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format string.format] function.  ==Usage== &amp;lt;pre&amp;gt;{{Sprintfexpr|format string|param}}&amp;lt;/pre&amp;gt;  The format string is specified according to [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#stri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation}}&lt;br /&gt;
{{invokes|sprintf}}&lt;br /&gt;
A subtemplate of [[Template:Sprintf]], that only takes one argument and automatically uses &amp;lt;code&amp;gt;#expr&amp;lt;/code&amp;gt; on it.&lt;br /&gt;
&lt;br /&gt;
Provides access to the lua [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format string.format] function.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;pre&amp;gt;{{Sprintfexpr|format string|param}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format string is specified according to [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format string.format], which uses [http://www.cplusplus.com/reference/cstdio/printf/ printf formatting] with a few exceptions. See documentation for full details. Only one parameter is added, so your format string should only include one replacement string&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* One decimal place: {{Sprintfexpr|%.1f|1.2*5.6*82.23654}}&lt;br /&gt;
* One decimal place (when an int): {{Sprintfexpr|%.1f|5*5}}&lt;br /&gt;
* Padding left as int: {{Sprintfexpr|%05d|2*2}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* One decimal place: {{Sprintfexpr|%.1f|1.2*5.6*82.23654}}&lt;br /&gt;
* One decimal place (when an int): {{Sprintfexpr|%.1f|5*5}}&lt;br /&gt;
* Padding left as int: {{Sprintfexpr|%05d|2*2}}&lt;br /&gt;
&lt;br /&gt;
{{TemplateData|&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Format string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;2&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Parameter&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Param to be inserted in the replacement position. Automatically #expr&amp;#039;d&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;Provides access to the lua string formatting function.&amp;quot;,&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;format&amp;quot;: &amp;quot;inline&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:Formatting templates]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>