Template:First word/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep →See also: reflect move and transclude not link the navbox, replaced: {{String templates see also}} → {{navbox string handling templates}} using AWB |
meta>DixonD Lua-based now |
||
Line 15: | Line 15: | ||
* {{first word|1=len = a+b |sep== }} → {{first word|1=len = a+b |sep== }} | * {{first word|1=len = a+b |sep== }} → {{first word|1=len = a+b |sep== }} | ||
* {{first word|Hear ye, users |sep=, }} → {{first word|Hear ye, users |sep=, }} | * {{first word|Hear ye, users |sep=, }} → {{first word|Hear ye, users |sep=, }} | ||
=== See also === | === See also === | ||
Line 26: | Line 23: | ||
[[Category:String manipulation templates]] | [[Category:String manipulation templates]] | ||
[[Category:Lua-based templates]] | [[Category:Lua-based templates]] | ||
</includeonly> | </includeonly> |
Revision as of 21:52, 14 March 2013
This is a documentation subpage for Template:First word. It may contain usage information, categories and other content that is not part of the original template page. |
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
Template:Navbox string handling templates