Difference between revisions of "Template:First word/doc"
Jump to navigation
Jump to search
imported>Sardanaphalus (sandbox non-categorization, template update) |
imported>Andy M. Wang ({{high-use|35000+}}) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| + | {{high-use|35000+}} | ||
{{lua|Module:String}} | {{lua|Module:String}} | ||
<!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----> | <!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----> | ||
Revision as of 21:48, 14 May 2016
| 40px | This is a documentation subpage for Template:First word. It contains usage information, categories and other content that is not part of the original template page. |
| 40px | This template is used on 254,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. Transclusion count updated automatically (see documentation). |
| 30px | This template uses Lua: |
Usage
Returns the first word of the first parameter. By default, words are delimited by spaces, but optional parameter sep=/ can set the word separator to slash (or any other character). The parameter should not have leading spaces, unless the word separator, sep, is set to another character.
Examples
- {{first word|Foo bar baz}} → Foo
- {{first word|Foo}} → Foo
- {{first word|Foo-bar-baz}} → Foo-bar-baz
- {{first word|Foo-bar-baz|sep=- }} → Foo
- {{first word|34,000,500|sep=, }} → 34
- {{first word|1=len = a+b |sep== }} → len
- {{first word|Hear ye, users |sep=, }} → Hear ye
See also