<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://fa.wikinoor.ir/w/index.php?action=history&amp;feed=atom&amp;title=%D8%A7%D9%84%DA%AF%D9%88%3AStr_%E2%89%A4_len%2Fdoc</id>
	<title>الگو:Str ≤ len/doc - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://fa.wikinoor.ir/w/index.php?action=history&amp;feed=atom&amp;title=%D8%A7%D9%84%DA%AF%D9%88%3AStr_%E2%89%A4_len%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://fa.wikinoor.ir/w/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:Str_%E2%89%A4_len/doc&amp;action=history"/>
	<updated>2026-06-16T23:29:46Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://fa.wikinoor.ir/w/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:Str_%E2%89%A4_len/doc&amp;diff=629505&amp;oldid=prev</id>
		<title>Wikinoor.ir: ۱ نسخه واردشده</title>
		<link rel="alternate" type="text/html" href="https://fa.wikinoor.ir/w/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:Str_%E2%89%A4_len/doc&amp;diff=629505&amp;oldid=prev"/>
		<updated>2023-01-03T19:44:22Z</updated>

		<summary type="html">&lt;p&gt;۱ نسخه واردشده&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;fa&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ‏۳ ژانویهٔ ۲۰۲۳، ساعت ۲۳:۱۴&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key fawiki:diff::1.12:old-629504:rev-629505 --&gt;
&lt;/table&gt;</summary>
		<author><name>Wikinoor.ir</name></author>
	</entry>
	<entry>
		<id>https://fa.wikinoor.ir/w/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:Str_%E2%89%A4_len/doc&amp;diff=629504&amp;oldid=prev</id>
		<title>fa&gt;Vanisaac: /* See also */clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other</title>
		<link rel="alternate" type="text/html" href="https://fa.wikinoor.ir/w/index.php?title=%D8%A7%D9%84%DA%AF%D9%88:Str_%E2%89%A4_len/doc&amp;diff=629504&amp;oldid=prev"/>
		<updated>2020-04-27T01:19:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;See also: &lt;/span&gt;clean up per &lt;a href=&quot;/w/index.php?title=WP:CAT&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:CAT (صفحه وجود ندارد)&quot;&gt;WP:CAT#T&lt;/a&gt; and &lt;a href=&quot;/w/index.php?title=WP:AWBREQ&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:AWBREQ (صفحه وجود ندارد)&quot;&gt;WP:AWBREQ&lt;/a&gt; add template:Sandbox other&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحهٔ تازه&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{high-use| 8153 }}&lt;br /&gt;
{{lua|Module:String}}&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;
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;
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&lt;br /&gt;
| 2 = A length&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.&lt;br /&gt;
&lt;br /&gt;
Length values below 0 are considered to be 0.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&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;
{{string-handling templates}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:String manipulation templates|{{PAGENAME}}]]&lt;br /&gt;
&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>fa&gt;Vanisaac</name></author>
	</entry>
</feed>