<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fallenchungus.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_rep%2Fdoc</id>
	<title>Template:Str rep/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fallenchungus.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AStr_rep%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://www.fallenchungus.wiki/index.php?title=Template:Str_rep/doc&amp;action=history"/>
	<updated>2026-04-18T00:37:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://www.fallenchungus.wiki/index.php?title=Template:Str_rep/doc&amp;diff=2334&amp;oldid=prev</id>
		<title>CapybaraKiller: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.fallenchungus.wiki/index.php?title=Template:Str_rep/doc&amp;diff=2334&amp;oldid=prev"/>
		<updated>2025-05-25T18:16:58Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:16, 25 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>CapybaraKiller</name></author>
	</entry>
	<entry>
		<id>https://www.fallenchungus.wiki/index.php?title=Template:Str_rep/doc&amp;diff=2333&amp;oldid=prev</id>
		<title>wikipedia&gt;64.114 etc at 02:58, 19 October 2024</title>
		<link rel="alternate" type="text/html" href="https://www.fallenchungus.wiki/index.php?title=Template:Str_rep/doc&amp;diff=2333&amp;oldid=prev"/>
		<updated>2024-10-19T02:58:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{used in system}}&lt;br /&gt;
{{cascade-protected template}}&lt;br /&gt;
{{Documentation subpage}}&lt;br /&gt;
{{lua|Module:String}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a modified copy of a given text, with the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; occurrence of a find-string replaced with a replacement-string.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
{{plainlist|1=&lt;br /&gt;
*{{tlc|Str rep|&amp;#039;&amp;#039;text...&amp;#039;&amp;#039;|&amp;#039;&amp;#039;find-string&amp;#039;&amp;#039;|&amp;#039;&amp;#039;replace-string&amp;#039;&amp;#039;}}&lt;br /&gt;
*&amp;lt;!--NO tlc here--&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Str rep| 1=&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;text...&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt; | 2=&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;find-string&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt; | 3=&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;replace-string&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt; }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is equivalent to {{mlx|String|replace|3=source=&amp;#039;&amp;#039;text...&amp;#039;&amp;#039;|4=&amp;#039;&amp;#039;find-string&amp;#039;&amp;#039;|5=&amp;#039;&amp;#039;replace-string&amp;#039;&amp;#039;|6=1}}.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
There are three positional (unnamed) parameters, all required:&lt;br /&gt;
# the initial text string subject to search and replacement&lt;br /&gt;
# the find-string to search for in the text&lt;br /&gt;
# the replacement string: param&amp;amp;nbsp;3 replaces param&amp;amp;nbsp;2&amp;#039;s first occurrence in param&amp;amp;nbsp;1.&lt;br /&gt;
&lt;br /&gt;
=== Details ===&lt;br /&gt;
&lt;br /&gt;
The value of the text parameter may be anything that resolves to a string, such as:&lt;br /&gt;
* Immediate text entered directly into the parameter field: {{tlc|str rep|Dogs chase cats.  Cats chase mice.|...}}&lt;br /&gt;
* A parameter passed from a transcluding template: {{tlc|str rep|&amp;lt;nowiki&amp;gt;{{{5|}}}&amp;lt;/nowiki&amp;gt;|...}} or {{tlc|str rep|&amp;lt;nowiki&amp;gt;{{{text|}}}&amp;lt;/nowiki&amp;gt;|...}}&lt;br /&gt;
* A file or template: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|{{Template:Str rep/doc/Dogs and cats}}|...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* or anything else that resolves to a string.&lt;br /&gt;
&lt;br /&gt;
=== Equal signs and pipes ===&lt;br /&gt;
&lt;br /&gt;
Equal signs in parameter values passed as immediate text either [[Help:Template#Hints and workarounds|need to be escaped]] as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or you can leave them unescaped and use the built-in numeric names ({{para|1}}, {{para|2}}, and {{para|3}}) for the three unnamed positional parameters, as in the section [[#Usage|usage]] at the top. &lt;br /&gt;
&lt;br /&gt;
Pipe characters in immediate text should be escaped either as &amp;lt;code&amp;gt;&amp;amp;amp;#124;&amp;lt;/code&amp;gt; or as {{tl|!}}. See [[Help:Template#Hints and workarounds]]. Pipe characters in embedded items such as params or template invocations don&amp;#039;t need to be escaped.&lt;br /&gt;
&lt;br /&gt;
=== White space ===&lt;br /&gt;
&lt;br /&gt;
Pay attention to the use of white space in the parameters; all white space is significant in positional parameters. In particular, [[Help:Template#Parameters|leading and trailing white space]] is not removed, and can affect the results. See contrasting [[#Examples|examples #1 and #2]] below.&lt;br /&gt;
&lt;br /&gt;
If you like the readability of having convenience blanks before and after the parameters so they&amp;#039;re not adjacent to the pipe characters, then use the [[Help:Template#Usage hints and workarounds|built-in numeric names]] {{para|1}}, etc. These will not include any leading or trailing blanks in the parameter value; see [[#Examples|example&amp;amp;nbsp;3]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|Dogs chase cats.|cats|balls}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ⟶ {{str rep|Dogs chase cats.|cats|balls}}&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|Dogs chase cats.|cats |balls }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ⟶ {{str rep|Dogs chase cats.|cats |balls }} &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;mdash;&amp;#039;&amp;#039;&amp;amp;nbsp;{{nay|8px}}&amp;amp;nbsp;leading and trailing blanks are significant; see [[#Details|Details]]&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|Dogs chase cats.|2=cats |3=balls }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ⟶ {{str rep|Dogs chase cats.|2=cats |3=balls }} &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;mdash;&amp;#039;&amp;#039;&amp;amp;nbsp;{{aye|8px}}&amp;amp;nbsp;... but not when named parameters are used&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|Dogs chase cats.  Cats chase mice.|chase|love}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ⟶ {{str rep|Dogs chase cats.  Cats chase mice.|chase|love}} &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;mdash;&amp;amp;nbsp;&amp;#039;&amp;#039;only first occurrence replaced&amp;#039;&amp;#039;&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{str rep|{{Str rep/doc/Dogs and cats}}|chase|love}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ⟶ {{str rep|{{Str rep/doc/Dogs and cats}}|chase|love}} &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;mdash;&amp;amp;nbsp;&amp;#039;&amp;#039;text can be entered by a template&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tl|Replace}} - to replace &amp;#039;&amp;#039;all&amp;#039;&amp;#039; occurrences (or a specific number of occurrences)&lt;br /&gt;
&lt;br /&gt;
{{string-handling templates|IRL}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS LINKS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:String manipulation templates|Replace, {{PAGENAME}}]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;64.114 etc</name></author>
	</entry>
</feed>