<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.randombell.com/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="https://wiki.randombell.com/index.php?action=history&amp;feed=atom&amp;title=Template%3AString-handling_templates"/>
	<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Template:String-handling_templates&amp;action=history"/>
	<updated>2026-04-05T14:40:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.randombell.com/index.php?title=Template:String-handling_templates&amp;diff=1647&amp;oldid=prev</id>
		<title>Randombell: Created page with &quot;{{#invoke:Navbox with collapsible groups|navbox | name = String-handling templates | state = {{{state|expanded}}} | bodyclass = plainlist | title = String-handling templates (help page) | selected = {{{selected|{{{expanded|{{{1|}}}}}}}}}  &lt;!---------------------- Trimming -------------------------&gt; | abbr1 = sub | sect1 = Substring (select chunk of string by its position) | content1 =  {{Aligned table |fullwidth=on |style=text-align: left; |...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Template:String-handling_templates&amp;diff=1647&amp;oldid=prev"/>
		<updated>2025-08-19T15:43:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{#invoke:Navbox with collapsible groups|navbox | name = String-handling templates | state = {{{state|expanded}}} | bodyclass = plainlist | title = String-handling templates &lt;a href=&quot;/index.php?title=Help:Manipulating_strings&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Help:Manipulating strings (page does not exist)&quot;&gt;(help page)&lt;/a&gt; | selected = {{{selected|{{{expanded|{{{1|}}}}}}}}}  &amp;lt;!---------------------- Trimming -------------------------&amp;gt; | abbr1 = sub | sect1 = Substring (select chunk of string by its position) | content1 =  {{Aligned table |fullwidth=on |style=text-align: left; |...&amp;quot;&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 = sub&lt;br /&gt;
| sect1 = Substring (select chunk of string by its position)&lt;br /&gt;
| content1 =  {{Aligned table |fullwidth=on |style=text-align: left; |col1width=50%;&lt;br /&gt;
  | {{Aligned table |style=padding-right: 2em;&lt;br /&gt;
    |col1style=width: 12em; text-align: right; padding-right: 0.75em;&lt;br /&gt;
    | {{tl|str sub new}} | Select a substring based on starting and ending index counted in either direction.&lt;br /&gt;
    | {{tl|str left}}      | Keep the first N characters of a string, or duplicate it to N characters.&lt;br /&gt;
    | {{tl|str crop}}      | Return all but the last N characters of a string.&lt;br /&gt;
    | {{tl|str index}}     | Return the N-th character of a string.&lt;br /&gt;
    }}&lt;br /&gt;
  | {{Aligned table&lt;br /&gt;
    |col1style=width: 12em; text-align: right; padding-right: 0.75em;&lt;br /&gt;
    | {{tl|str right}}     | Return substring starting at N-th character to end of string.&lt;br /&gt;
    | {{tl|str rightc}}    | Return the last N characters of a string; or a given value if empty.&lt;br /&gt;
    | {{tl|str sub old}}   | Return substring of given length starting at N-th character.&lt;br /&gt;
}} }}&lt;br /&gt;
&lt;br /&gt;
| abbr2 = trim&lt;br /&gt;
| sect2 = Trimming (select/remove chunk of string by character type)&lt;br /&gt;
| content2 =&lt;br /&gt;
{{Aligned table |fullwidth=on |style=text-align: left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right: 2em;&lt;br /&gt;
       |col1style=width: 12em; text-align: right; padding-right: 0.75em;&lt;br /&gt;
       | {{tl|trim}}                | Trim any leading or trailing whitespace&lt;br /&gt;
       | {{tl|str letter/trim}}     | Trim down to the beginning letters.&lt;br /&gt;
       | {{tl|str number/trim}}     | Trim down to the beginning numbers.&lt;br /&gt;
       | {{tl|trim brackets}}       | Trim any leading or trailing square brackets.&lt;br /&gt;
       | {{tl|trim quotes}}         | Trim leading or trailing matching quotes.&lt;br /&gt;
       | {{tl|trim leading}}        | 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: 12em; 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}}          | Trim down to the first space.&lt;br /&gt;
       | {{tl|remove first word}}   | Remove anything before the first space.&lt;br /&gt;
       | {{tl|last word}}           | Trim down from the last space.&lt;br /&gt;
       | {{tl|remove last word}}    | Remove anything after the last space.&lt;br /&gt;
}} }}&lt;br /&gt;
&lt;br /&gt;
| abbr3 = specific&lt;br /&gt;
| group3 = Select/remove specific item from string&lt;br /&gt;
| content3 =&lt;br /&gt;
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right: 2em;&lt;br /&gt;
       |col1style=width: 12em; text-align: right; padding-right: 0.75em;&lt;br /&gt;
       | {{tl|delink}}, {{tl|trim brackets}} | Removes wikilink brackets (wikicode); &amp;#039;&amp;#039;all&amp;#039;&amp;#039; or &amp;#039;&amp;#039;outer only&amp;#039;&amp;#039;.&lt;br /&gt;
       | {{tl|Plain text}}          | Removes wikicode (formatting and brackets)&lt;br /&gt;
       | {{tl|PAGENAMEBASE}}        | 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: 12em; text-align: right; padding-right: 0.75em;&lt;br /&gt;
       | {{tl|title year}}          | Returns the 3-or-4-digit year from a pagename, if any.&lt;br /&gt;
       | {{tl|title decade}}        | Returns the 4-digit decade from a pagename (e.g. &amp;quot;1740&amp;quot; from &amp;quot;Foo 1740s bar&amp;quot;), if any.&lt;br /&gt;
       | {{tl|title number}}        | Returns any number from a pagename.&lt;br /&gt;
       | {{tl|WikiProjectbasename}} | Removes &amp;quot;WikiProject&amp;quot; from a pagename.&lt;br /&gt;
   }} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------- Insertion, replacement, length --------------&amp;gt;&lt;br /&gt;
| abbr4 = IRL&lt;br /&gt;
| sect4 = Insertion, replacement, and length&lt;br /&gt;
| content4 =&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: 2em;&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 &amp;#039;&amp;#039;all&amp;#039;&amp;#039; 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|Nowiki}}        | Displays wikitext as plain text.&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&amp;#039;s length.&lt;br /&gt;
     | {{tl|str ≥ len}}     | 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}}     | 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}}     | 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;
| abbr5 = anlys/tech&lt;br /&gt;
| sect5 = Analysis and searching&lt;br /&gt;
| content5 =&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: 2em;&lt;br /&gt;
     |col1style=text-align: right; padding-right: 0.75em;&lt;br /&gt;
     | {{tl|str startswith}}&amp;lt;br&amp;gt;{{tl|str endswith}}  | Check if a string starts or 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 count}}     | Count the number of occurrences of a pattern within a string.&lt;br /&gt;
    }}&lt;br /&gt;
  |  &amp;lt;!---(Analysis cont&amp;#039;d)---&amp;gt;&lt;br /&gt;
    {{Aligned table&lt;br /&gt;
     |col1style=text-align: right; padding-right: 0.75em;&lt;br /&gt;
     | {{tl|Array}}         | Array item manipulation and retrieval.&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|in string}}     | Returns optional string when given string is not found&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;
|state1=&amp;lt;noinclude&amp;gt;expanded&amp;lt;/noinclude&amp;gt;&amp;lt;!-- show everything on this template&amp;#039;s page --&amp;gt;&lt;br /&gt;
|state2=&amp;lt;noinclude&amp;gt;expanded&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|state3=&amp;lt;noinclude&amp;gt;expanded&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|state4=&amp;lt;noinclude&amp;gt;expanded&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|state5=&amp;lt;noinclude&amp;gt;expanded&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|state6=expanded&lt;br /&gt;
|group6=Modules and built-in functions&lt;br /&gt;
|list6={{div col|style=text-align:left}}&lt;br /&gt;
* [[:Module:String]], [[:Module:String2]], [[:Module:Ustring]], [[Module:Text]], [[:Template:Navbox wikitext-handling templates|wikitext handling]]: 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;
** [[:c:Category:String manipulation templates|Commons]]&lt;br /&gt;
** [[:mw:Category:String manipulation templates|MediaWiki]]&lt;br /&gt;
** [[:m:Category:String manipulation templates|Meta-Wiki]]&lt;br /&gt;
** [[:d:Category:String manipulation templates|Wikidata]]&lt;br /&gt;
* [[:Category:Modules that manipulate strings]]&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>Randombell</name></author>
	</entry>
</feed>