<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.filipefonseca.pt/index.php?action=history&amp;feed=atom&amp;title=Template%3AString-handling_templates</id>
	<title>Template:String-handling templates - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.filipefonseca.pt/index.php?action=history&amp;feed=atom&amp;title=Template%3AString-handling_templates"/>
	<link rel="alternate" type="text/html" href="http://wiki.filipefonseca.pt/index.php?title=Template:String-handling_templates&amp;action=history"/>
	<updated>2026-04-18T19:54:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>http://wiki.filipefonseca.pt/index.php?title=Template:String-handling_templates&amp;diff=5154&amp;oldid=prev</id>
		<title>FilipeFonseca: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.filipefonseca.pt/index.php?title=Template:String-handling_templates&amp;diff=5154&amp;oldid=prev"/>
		<updated>2021-07-08T15:06:17Z</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;{{#invoke:Navbox with collapsible groups|navbox&lt;br /&gt;
| name = String-handling templates&lt;br /&gt;
| state = {{{state|expanded}}}&lt;br /&gt;
| bodyclass = plainlist&lt;br /&gt;
| title = String-handling templates [[Help:Manipulating_strings|(help page)]]&lt;br /&gt;
| selected = {{{selected|{{{expanded|{{{1|}}}}}}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---------------------- Trimming -------------------------&amp;gt;&lt;br /&gt;
| abbr1 = trim&lt;br /&gt;
| sect1 = [[Trimming (computer programming)|Trimming]]&lt;br /&gt;
| content1 = {{#invoke:navbox|navbox|child&lt;br /&gt;
  | group1 = By counting&lt;br /&gt;
  | list1 =&lt;br /&gt;
  '''{{ml|string|sub|section=#sub}}''', {{tl|str sub new}}: Select a substring based on starting and ending index counted in either direction.&lt;br /&gt;
  {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|trunc}}         | To trim down to a specified number of characters.&lt;br /&gt;
       | {{tl|str left}}      | To trim down to a specified number of characters or duplicate the string to a specified number.&lt;br /&gt;
       | {{tl|str crop}}      | To crop a specified number of characters off the end.&lt;br /&gt;
       | {{tl|str index}}     | Returns a given character from a string, but not accented letters.&lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|str right}}     | To trim the first specified number of characters.&lt;br /&gt;
       | {{tl|str rightc}}    | To return a number of characters from the end, returns a parameter if the string is empty.&lt;br /&gt;
       | {{tl|str rightmost}} | To trim down to the last specified number of characters.&lt;br /&gt;
       | {{tl|str sub old}}   | To trim down to a specified number, starting at a given number from the left.&lt;br /&gt;
   }} }}&lt;br /&gt;
&lt;br /&gt;
  | group2 = By checking&lt;br /&gt;
  | list2 =&lt;br /&gt;
   {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|trim}}                | To trim any leading or trailing whitespace&lt;br /&gt;
       | {{tl|str letter/trim}}     | To trim down to the beginning letters.&lt;br /&gt;
       | {{tl|str number/trim}}     | To trim down to the beginning numbers.&lt;br /&gt;
       | {{tl|trim brackets}}       | To trim any leading or trailing square brackets.&lt;br /&gt;
       | {{tl|trim quotes}}         | To trim leading or trailing matching quotes.&lt;br /&gt;
       | {{tl|trim leading}}        | To trim up to six instances of specified &amp;lt;prefix&amp;gt;.&lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|string split}}        | Extract a short string from a long string.&lt;br /&gt;
       | {{tl|first word}}          | To trim down to the first space.&lt;br /&gt;
       | {{tl|remove first word}}   | To remove anything before the first space.&lt;br /&gt;
       | {{tl|last word}}           | To trim down from the last space.&lt;br /&gt;
       | {{tl|remove last word}}    | To remove anything after the last space.&lt;br /&gt;
   }} }}&lt;br /&gt;
&lt;br /&gt;
  | group3 = Dedicated&lt;br /&gt;
  | list3 =&lt;br /&gt;
   {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|delink}}, {{tl|trim brackets}} | Removes wikilink brackets (wikicode); ''all'' or ''outer only''.&lt;br /&gt;
       | {{tl|remove file prefix}}  | Removes &amp;quot;File:&amp;quot; (or &amp;quot;Image:&amp;quot;) from filenames.&lt;br /&gt;
       | {{tl|PAGENAMEBASE}}        | To trim off any parenthesis text at the end of a string (disambiguation).&lt;br /&gt;
       | {{tl|title disambig text}} | Returns text in parentheses at the end of a string (disambiguation).&lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;padding-right:0.75em;&lt;br /&gt;
       | {{tl|WikiProjectbasename}} | Removes &amp;quot;WikiProject&amp;quot; from a pagename.&lt;br /&gt;
       | {{tl|remove unranked}}     | Removes the string &amp;quot;unranked_&amp;quot; from the left of a string (taxonomy).&lt;br /&gt;
       | {{tl|ship prefix}}         | Returns the length of a ship's name prefix, if listed (ship names).&lt;br /&gt;
       | {{tl|title year}}          | Returns the 4-digit year from a pagename, if any.&lt;br /&gt;
       | {{tl|title decade}}        | Returns the 4-digit decade (e.g. &amp;quot;1740s&amp;quot;) from a pagename, if any.&lt;br /&gt;
   }} }}&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------- Insertion, replacement, length --------------&amp;gt;&lt;br /&gt;
| abbr2 = IRL&lt;br /&gt;
| sect2 = Insertion, replacement and length&lt;br /&gt;
| content2 =&lt;br /&gt;
 {{Aligned table |style=margin:0 auto 0;text-align:left;&lt;br /&gt;
  |  &amp;lt;!---(Insertion, replacement)---&amp;gt;&lt;br /&gt;
    {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
     |col1style=text-align:right;padding-right:0.75em;&lt;br /&gt;
     | {{tl|loop}}          | Repeat character string a specified number of times.&lt;br /&gt;
     | {{tl|replace}}       | Returns the string, after replacing ''all'' occurrences of a specified string with another string.&lt;br /&gt;
     | {{tl|str rep}}       | Returns the string, after replacing the first occurrence of a specified string with another string.&lt;br /&gt;
     | {{tl|digits}}        | Returns the string, after removing all characters that are not digits 0–9&lt;br /&gt;
     | {{tl|Plain text}}, {{tl|Nowiki}}    | Strips wikicode from a string.&lt;br /&gt;
    }}&lt;br /&gt;
  |  &amp;lt;!---(Length)---&amp;gt;&lt;br /&gt;
    {{Aligned table&lt;br /&gt;
     |col1style=text-align:right;padding-right:0.75em;&lt;br /&gt;
     | {{tl|str len}}       | Returns a string's length.&lt;br /&gt;
     | {{tl|str ≥ len}}     | To check if a string is &amp;quot;longer or equally long&amp;quot; or &amp;quot;shorter&amp;quot; than a given length.&lt;br /&gt;
     | {{tl|str ≤ len}}     | To check if a string is &amp;quot;shorter or equally long&amp;quot; or &amp;quot;longer&amp;quot; than a given length.&lt;br /&gt;
     | {{tl|str ≠ len}}     | To check if a string is &amp;quot;not equal&amp;quot; or &amp;quot;equal&amp;quot; to a given length.&lt;br /&gt;
 }} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------------- Analysis, technical -------------------&amp;gt;&lt;br /&gt;
| abbr3 = anlys/tech&lt;br /&gt;
| sect3 = Analysis and searching&lt;br /&gt;
| content3 =&lt;br /&gt;
 {{Aligned table |style=margin:0 auto 0;text-align:left;&lt;br /&gt;
  |  &amp;lt;!---(Analysis)---&amp;gt;&lt;br /&gt;
    {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
     |col1style=text-align:right;padding-right:0.75em;&lt;br /&gt;
     | {{tl|str endswith}}  | To check if a string ends with a given string.&lt;br /&gt;
     | {{tl|str find}}, {{tl|strfind short}} |style2.2=vertical-align:middle;| Returns the numerical location of a given string in a string.&lt;br /&gt;
     | {{tl|str find0}}     | Zero-based substring search.&lt;br /&gt;
    }}&lt;br /&gt;
  |  &amp;lt;!---(Analysis cont'd)---&amp;gt;&lt;br /&gt;
    {{Aligned table&lt;br /&gt;
     |col1style=text-align:right;padding-right:0.75em;&lt;br /&gt;
     | {{tl|a or an}}       | Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel.&lt;br /&gt;
     | {{tl|Isnumeric}}     | Returns number when true, blank when not numeric.&lt;br /&gt;
     | {{tl|str letter}}    | Returns the number of letters that begin a string.&lt;br /&gt;
     | {{tl|str number}}    | Returns the number of numbers that begin a string.&lt;br /&gt;
 }} }}&lt;br /&gt;
|state4=expanded&lt;br /&gt;
|group4=Modules and built-in functions&lt;br /&gt;
|list4={{div col|style=text-align:left}}&lt;br /&gt;
* [[:Module:String]], [[:Module:String2]], [[:Module:Ustring]]: modules that together contain most necessary string functions.&lt;br /&gt;
* [[mw:Help:Magic words|Magic words]]: About &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{padleft:&amp;amp;#124;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{lc:&amp;amp;#124;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,  &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{formatnum:&amp;amp;#124;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; etc.&lt;br /&gt;
* [[mw:Help:Extension:ParserFunctions|ParserFunctions]]: About &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#titleparts:&amp;amp;#124;}}, {{#expr:&amp;amp;#124;}}, {{#ifeq:&amp;amp;#124;}}, &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; etc.{{div col end}}&lt;br /&gt;
&amp;lt;!----------------------- below ---------------------------&amp;gt;&lt;br /&gt;
| belowclass = hlist&lt;br /&gt;
| below =&lt;br /&gt;
* [[:Category:String manipulation templates]]&lt;br /&gt;
* [[m:Category:String templates]]&lt;br /&gt;
* [[:commons:Category:String manipulation templates]]&lt;br /&gt;
&lt;br /&gt;
| tracking = no &amp;lt;!--(keep all these string templates (by /doc pages) out of the tracking category)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>FilipeFonseca</name></author>
	</entry>
</feed>