Template:Remove first word/doc: Difference between revisions
Jump to navigation
Jump to search
en>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
(No difference)
|
Revision as of 21:36, 26 April 2020
{{#ifeq:doc |doc
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Remove first word | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
This template is used on approximately 116,000 pages. 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. Consider discussing changes on the talk page before implementing them. |
Uses Lua: |
This template removes the first word of the first parameter. Use |{{SAFESUBST:#if:1|1=}}
for the first parameter if the string may contain an equals sign (=). By default, words are delimited by spaces, but the optional parameter |{{SAFESUBST:#if:sep|sep=}}
can set the separator to any character.
Usage
One parameter (space as separator):
{{Remove first word|string}}
{{Remove first word|1=string}}
Two parameters (user-defined character as separator):
{{Remove first word|string|sep=character}}
{{Remove first word|1=string|sep=character}}
Examples
- Lua error in Module:Template_link_general at line 144: attempt to concatenate local 'titlePart' (a nil value). → bår bàz
- Lua error in Module:Template_link_general at line 144: attempt to concatenate local 'titlePart' (a nil value). → bår bàz
- Lua error in Module:Template_link_general at line 144: attempt to concatenate local 'titlePart' (a nil value). → b
- Lua error in Module:Template_link_general at line 144: attempt to concatenate local 'titlePart' (a nil value). →
- Lua error in Module:Template_link_general at line 144: attempt to concatenate local 'titlePart' (a nil value). → bàz
{{Remove first word|Fôo-bår bàz|sep=-}}
→ bår bàz{{Remove first word|34,000,500|sep=,}}
→ 000,500{{Remove first word|Hear ye, users|sep=,}}
→ users{{Remove first word|1=len = a+b|sep==}}
→ a+b
See also