<?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%3ATrim_brackets%2Fdoc</id>
	<title>Template:Trim brackets/doc - 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%3ATrim_brackets%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Template:Trim_brackets/doc&amp;action=history"/>
	<updated>2026-10-13T16:05:39Z</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:Trim_brackets/doc&amp;diff=2953&amp;oldid=prev</id>
		<title>Randombell: Created page with &quot;{{Documentation subpage}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt; {{shortcut|Template:Trimbr}} {{lua|Module:String}}  This template trims leading and trailing square brackets and whitespace from a string. This is similar to {{tl|delink}}, but it won&#039;t remove brackets from the middle of the string. The string should be passed as the first unnamed parameter or using {{para|1}} if your string contains any &lt;code&gt;=&lt;/code&gt; signs. You may WP:S...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Template:Trim_brackets/doc&amp;diff=2953&amp;oldid=prev"/>
		<updated>2026-07-10T17:07:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt; {{shortcut|Template:Trimbr}} {{lua|Module:String}}  This template trims leading and trailing square brackets and whitespace from a string. This is similar to {{tl|delink}}, but it won&amp;#039;t remove brackets from the middle of the string. The string should be passed as the first unnamed parameter or using {{para|1}} if your string contains any &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; signs. You may WP:S...&amp;quot;&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;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
{{shortcut|Template:Trimbr}}&lt;br /&gt;
{{lua|Module:String}}&lt;br /&gt;
&lt;br /&gt;
This template trims leading and trailing square brackets and whitespace from a string. This is similar to {{tl|delink}}, but it won&amp;#039;t remove brackets from the middle of the string. The string should be passed as the first unnamed parameter or using {{para|1}} if your string contains any &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; signs. You may [[WP:SUBST|substitute]] this template - that is, if used as {{tlxs|trim brackets}}, the resulting wikicode is &amp;quot;clean&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
{{tlx|trim brackets|&amp;#039;&amp;#039;text&amp;#039;&amp;#039;}} = &amp;#039;&amp;#039;text&amp;#039;&amp;#039; with any leading or trailing square brackets removed (as long as &amp;#039;&amp;#039;text&amp;#039;&amp;#039; doesn&amp;#039;t contain any &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; signs).&lt;br /&gt;
&lt;br /&gt;
{{tlx|1=trim brackets|2=1=&amp;#039;&amp;#039;text&amp;#039;&amp;#039;}} = &amp;#039;&amp;#039;text&amp;#039;&amp;#039; with any leading or trailing square brackets removed.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
*&amp;quot;{{tlx|trim brackets|&amp;lt;nowiki&amp;gt;1= [[abc]] &amp;lt;/nowiki&amp;gt;}}&amp;quot; produces &amp;quot;{{trim brackets|1= [[abc]] }}&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;{{tlx|trim brackets|&amp;lt;nowiki&amp;gt;1= [[abc]], [[def]], and [[ghi]] &amp;lt;/nowiki&amp;gt;}}&amp;quot; produces &amp;quot;{{trim brackets|1= [[abc]], [[def]], and [[ghi]] }}&amp;quot;&amp;lt;br /&amp;gt;(&amp;quot;{{tlx|delink|&amp;lt;nowiki&amp;gt;1= [[abc]], [[def]], and [[ghi]] &amp;lt;/nowiki&amp;gt;}}&amp;quot; produces &amp;quot;{{delink|1= [[abc]], [[def]], and [[ghi]] }}&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;{{tlx|trim brackets|&amp;lt;nowiki&amp;gt;1= [[abc|xyz]] &amp;lt;/nowiki&amp;gt;}}&amp;quot; produces &amp;quot;{{trim brackets|1= [[abc|xyz]] }}&amp;quot;.&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 trims leading and trailing square brackets from a 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;String&amp;quot;,&lt;br /&gt;
                        &amp;quot;description&amp;quot;: &amp;quot;The string to be trimmed&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;
== See also ==&lt;br /&gt;
* {{tl|delink}}, which does nearly the exact same thing, but also removes balanced pairs of square brackets that aren&amp;#039;t leading and trailing and has additional options.&lt;br /&gt;
* {{tl|trim}}&lt;br /&gt;
* {{tl|Escape page link from within}}&lt;br /&gt;
* {{tl|Linked}} – links if not already linked&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{String-handling templates |trim brackets}}&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]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Randombell</name></author>
	</entry>
</feed>