![]() |
Congratulations /mlp/! | ![]() |
---|---|---|
Winners of the 2025 4chan Winter Cup |
Template:Replace
Jump to navigation
Jump to search
[edit] [ ]
Template documentation
![](/w/images/thumb/4/4c/Template-info.svg/50px-Template-info.svg.png)
Usage
Template:((replace |string |target |replacement [|count=n]}}
Returns string with the first n occurrences of target replaced with replacement. Omitting count
will replace all occurrences.
Examples
{{replace |One two two three two four twotwo five |two |NINE}}
→ {{#invoke:String|replace|source=One two two three two four twotwo five|two|NINE|count=|plain=1}}{{replace |One two two three two four twotwo five |two |NINE |count=2}}
→ {{#invoke:String|replace|source=One two two three two four twotwo five|two|NINE|count=2|plain=1}}
The above documentation is transcluded from Template:Replace/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |