Template:Str rep/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Str rep. It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
This template is used in system messages, and on approximately 292,000 pages, or roughly 729% of all pages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
Usage
{{Str rep|string|find|replacewith}}
Returns string with the first occurrence of find replaced with replacewith. Equivalent to {{#invoke:String|replace|source=string|find|replacewith|1}}.
Example
{{str rep|Dogs chase cats. Cats chase mice.|chase|love}}
= Dogs love cats. Cats chase mice.
See also
- {{Replace}} - to replace all occurrences (or a specific number)