<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://deeppolitics.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_len%2Fdoc</id>
	<title>Template:Str len/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://deeppolitics.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_len%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://deeppolitics.org/index.php?title=Template:Str_len/doc&amp;action=history"/>
	<updated>2026-12-01T04:55:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://deeppolitics.org/index.php?title=Template:Str_len/doc&amp;diff=33033&amp;oldid=prev</id>
		<title>WikiSpooks&gt;Robin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://deeppolitics.org/index.php?title=Template:Str_len/doc&amp;diff=33033&amp;oldid=prev"/>
		<updated>2015-12-05T03:11:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&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;
{{Used in system}}&lt;br /&gt;
{{Lua|Module:String}}&lt;br /&gt;
&amp;lt;!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----&amp;gt;&lt;br /&gt;
This is the {{tl|str len}} meta-template.&lt;br /&gt;
&lt;br /&gt;
It takes a string as parameter and returns its length (excluding spaces at the start and end). It can now count as high as necessary.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
If the parameter is empty or undefined it is considered to be of zero length: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len}}&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len|}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len|}}&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| }}&lt;br /&gt;
&lt;br /&gt;
It counts the length correctly, even if the string contains spaces, looks like a number, or contains special characters:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| ab cde }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| ab cde }}&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| 1234567 }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| 1234567 }}&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| café åäö }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| café åäö }}&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| 499-characters... }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi }}&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str len| 1000-characters... }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{str len| abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghij }}&lt;br /&gt;
&lt;br /&gt;
===Template data===&lt;br /&gt;
{{TemplateDataHeader}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
        &amp;quot;description&amp;quot;: &amp;quot;The template takes a string as parameter and returns its length, excluding spaces at the start and end of the string&amp;quot;,&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;Alpha-numeric text&amp;quot;,&lt;br /&gt;
                        &amp;quot;description&amp;quot;: &amp;quot;The string to be counted&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;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Technical details===&lt;br /&gt;
This is the first general-purpose template to be implemented using [[mw:Extension:Scribunto]]. The Lua code is located in [[Module:String]].&lt;br /&gt;
&lt;br /&gt;
===See also===&lt;br /&gt;
{{String-handling templates |IRL}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!----CATEGORIES BELOW THIS LINE, PLEASE:----&amp;gt;&lt;br /&gt;
[[Category:String manipulation templates]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiSpooks&gt;Robin</name></author>
	</entry>
</feed>