<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt">
	<id>https://wiki.nivel-teorico.com/index.php?action=history&amp;feed=atom&amp;title=Predefini%C3%A7%C3%A3o%3AStr_%E2%89%A5_len%2Fdoc</id>
	<title>Predefinição:Str ≥ len/doc - Histórico de revisões</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nivel-teorico.com/index.php?action=history&amp;feed=atom&amp;title=Predefini%C3%A7%C3%A3o%3AStr_%E2%89%A5_len%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.nivel-teorico.com/index.php?title=Predefini%C3%A7%C3%A3o:Str_%E2%89%A5_len/doc&amp;action=history"/>
	<updated>2026-04-18T10:54:56Z</updated>
	<subtitle>Histórico de edições para esta página nesta wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://wiki.nivel-teorico.com/index.php?title=Predefini%C3%A7%C3%A3o:Str_%E2%89%A5_len/doc&amp;diff=9398&amp;oldid=prev</id>
		<title>Calimero0000: Criou página com: &#039;{{Subpágina de documentação}} &lt;!-- Categorias no final desta página e links para outros idiomas no Wikidata --&gt; {{lua|Módulo:String}} == Descrição == Esta é a meta-pr...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.nivel-teorico.com/index.php?title=Predefini%C3%A7%C3%A3o:Str_%E2%89%A5_len/doc&amp;diff=9398&amp;oldid=prev"/>
		<updated>2014-08-01T08:59:14Z</updated>

		<summary type="html">&lt;p&gt;Criou página com: &amp;#039;{{Subpágina de documentação}} &amp;lt;!-- Categorias no final desta página e links para outros idiomas no Wikidata --&amp;gt; {{lua|Módulo:String}} == Descrição == Esta é a meta-pr...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Subpágina de documentação}}&lt;br /&gt;
&amp;lt;!-- Categorias no final desta página e links para outros idiomas no Wikidata --&amp;gt;&lt;br /&gt;
{{lua|Módulo:String}}&lt;br /&gt;
== Descrição ==&lt;br /&gt;
Esta é a meta-predefinição {{Lp|str ≥ len}}&lt;br /&gt;
&lt;br /&gt;
Ela ajuda outras predefinições a determinar se uma &amp;#039;&amp;#039;[[string]]&amp;#039;&amp;#039; é maior/igual ou menor que um dado comprimento.&lt;br /&gt;
&lt;br /&gt;
=== Uso ===&lt;br /&gt;
{{em tradução}}&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 more:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{str ≥ len | abcde | 4&lt;br /&gt;
| Equal or longer.&lt;br /&gt;
| Shorter.&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 longer.&lt;br /&gt;
| Shorter.&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 more:&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 longer.&lt;br /&gt;
| 4 = Shorter, 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 longer.&lt;br /&gt;
| 4 = Shorter, 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;
=== Parâmetros ===&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&lt;br /&gt;
| 2 = A length&lt;br /&gt;
| 3 = Data to return/render when &amp;quot;longer than or equally long&amp;quot;.&lt;br /&gt;
| 4 = Data to return/render when &amp;quot;shorter 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;
=== Detalhes técnicos ===&lt;br /&gt;
The potential alternative templates names &amp;lt;nowiki&amp;gt;{{str &amp;gt;= len}} or (for the opposite) {{str &amp;lt; 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 very 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;
=== Ver também ===&lt;br /&gt;
&lt;br /&gt;
{{navbox string handling templates}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- Categorias aqui e links para outros idiomas no Wikidata --&amp;gt;&lt;br /&gt;
[[Categoria:!Predefinições de manipulação de cadeias]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Calimero0000</name></author>
	</entry>
</feed>