<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sudoroom.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_%C3%A2%E2%80%B0%C2%A4_len%2Fdoc</id>
	<title>Template:Str â‰¤ len/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://sudoroom.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_%C3%A2%E2%80%B0%C2%A4_len%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://sudoroom.org/mediawiki/index.php?title=Template:Str_%C3%A2%E2%80%B0%C2%A4_len/doc&amp;action=history"/>
	<updated>2026-04-04T11:07:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://sudoroom.org/mediawiki/index.php?title=Template:Str_%C3%A2%E2%80%B0%C2%A4_len/doc&amp;diff=1313&amp;oldid=prev</id>
		<title>Maximilianklein: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://sudoroom.org/mediawiki/index.php?title=Template:Str_%C3%A2%E2%80%B0%C2%A4_len/doc&amp;diff=1313&amp;oldid=prev"/>
		<updated>2012-12-12T07:47:06Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:47, 12 December 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Maximilianklein</name></author>
	</entry>
	<entry>
		<id>https://sudoroom.org/mediawiki/index.php?title=Template:Str_%C3%A2%E2%80%B0%C2%A4_len/doc&amp;diff=1312&amp;oldid=prev</id>
		<title>122.134.190.114: +ja</title>
		<link rel="alternate" type="text/html" href="https://sudoroom.org/mediawiki/index.php?title=Template:Str_%C3%A2%E2%80%B0%C2%A4_len/doc&amp;diff=1312&amp;oldid=prev"/>
		<updated>2012-01-28T10:12:45Z</updated>

		<summary type="html">&lt;p&gt;+ja&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{high-risk| 350,000+ }}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the {{tl|str â‰¤ len}} meta-template.&lt;br /&gt;
&lt;br /&gt;
It helps other templates check if a string is &amp;quot;shorter or equally long&amp;quot; vs. &amp;quot;longer&amp;quot; than a given length.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
This template takes 3 to 4 unnamed parameters.&lt;br /&gt;
&lt;br /&gt;
Here is how to check if the string &amp;quot;abcde&amp;quot; is 4 characters or less:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{str â‰¤ len | abcde | 4&lt;br /&gt;
| Equal or shorter.&lt;br /&gt;
| Longer.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which returns this:&lt;br /&gt;
&lt;br /&gt;
:{{str â‰¤ len | abcde | 4&lt;br /&gt;
| Equal or shorter.&lt;br /&gt;
| Longer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Templates have a problem to handle parameter data that contains equal signs &amp;quot;&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&amp;quot;. But that is easily solved by using numbered parameters. Here we check if the string &amp;quot;ab=cde&amp;quot; is 100 characters or less:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{str â‰¤ len &lt;br /&gt;
| 1 = ab=cde &lt;br /&gt;
| 2 = 100&lt;br /&gt;
| 3 = Equal &amp;quot;=&amp;quot; or shorter.&lt;br /&gt;
| 4 = Longer, not &amp;quot;=&amp;quot;.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which returns this:&lt;br /&gt;
&lt;br /&gt;
:{{str â‰¤ len &lt;br /&gt;
| 1 = ab=cde &lt;br /&gt;
| 2 = 100&lt;br /&gt;
| 3 = Equal &amp;quot;=&amp;quot; or shorter.&lt;br /&gt;
| 4 = Longer, not &amp;quot;=&amp;quot;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It probably is a good habit to always use the numbered parameters, since you might not know beforehand exactly how the data will look that your template will feed to this meta-template.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
Detailed parameter explanation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{str â‰¤ len &lt;br /&gt;
| 1 = A string, 0-500 characters long.&lt;br /&gt;
| 2 = 0 - 500&lt;br /&gt;
| 3 = Data to return/render when &amp;quot;shorter than or equally long&amp;quot;.&lt;br /&gt;
| 4 = Data to return/render when &amp;quot;longer than&amp;quot;.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Empty or undefined strings are considered to be of 0 length. Strings longer than 500 are not truncated to 500.&lt;br /&gt;
&lt;br /&gt;
Length values below 0 are considered to be 0. Length values above 500 are considered to be 500.&lt;br /&gt;
&lt;br /&gt;
Thus a string longer than 500 is always considered to be &amp;quot;longer&amp;quot;, even if it is compared with the &amp;quot;correct&amp;quot; length value.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
The potential alternative templates names &amp;lt;nowiki&amp;gt;{{str &amp;lt;= len}} or (for the opposite) {{str &amp;gt; len}}&amp;lt;/nowiki&amp;gt; do not work in MediaWiki.&lt;br /&gt;
&lt;br /&gt;
Even though this is a string handling template it uses efficient code. (While some of the other string handling templates are probably so heavy on the servers that we perhaps should not use them.)&lt;br /&gt;
&lt;br /&gt;
[[Help:Template|Templates]] have problems to handle parameter data that contains pipes &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name|param1}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template|help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Thus templates can not handle [[Help:Table|wikitables]] as input unless you escape them by using the {{tn|!}} template. This makes it hard to use wikitables as parameters to templates. Instead the usual solution is to use &amp;quot;[[Help:HTML in wikitext|HTML wikimarkup]]&amp;quot; for the table code, which is more robust.&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
&lt;br /&gt;
{{string templates see also}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:String manipulation templates|{{PAGENAME}}]]&lt;br /&gt;
[[ja:Template:Str â‰¦ len]]&lt;br /&gt;
[[id:Templat:Str â‰¤ len]]&lt;br /&gt;
[[ko:í‹€:Str â‰¤ len]]&lt;br /&gt;
[[sl:Predloga:Str â‰¤ len]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>122.134.190.114</name></author>
	</entry>
</feed>