Template:Replace/doc
Jump to navigation
Jump to search
{{#invoke:Message box|mbox}} {{#invoke:Lua banner|main}}
Usage
{{Replace|<string>|<find>|<replacewith>[|count=n]}}
Returns <string> with the n occurrences of <find> replaced with <replacewith>. Omitting <syntaxhighlight lang="text" enclose="none">count</syntaxhighlight>
will replace all occurrences
Example
- {{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=}}
- {{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}}
See also
- {{str rep}} — replaces only the first occurrence.
{{#invoke:Navbox|navbox}}