Template:First word/doc

From BibleStrength

Template:Documentation subpage Template:High-use Template:Lua

This template returns the first word of the first parameter. Use |1= for the first parameter if the string may contain an equals sign (=). By default, words are delimited by spaces, but the optional parameter |sep= can set the separator to any character.

Usage

One parameter (space as separator):

  • {{First word|string}}
  • {{First word|1=string}}

Two parameters (user-defined character as separator):

  • {{First word|string|sep=character}}
  • {{First word|1=string|sep=character}}

Examples

  • {{First word|Foo bar baz}}Script error: No such module "String".
  • {{First word| Foo bar baz}}Script error: No such module "String".
  • {{First word|Foo}}Script error: No such module "String".
  • {{First word|Foo-bar-baz}}Script error: No such module "String".
  • {{First word|Foo-bar-baz|sep=-}}Script error: No such module "String".
  • {{First word|34,000,500|sep=,}}Script error: No such module "String".
  • {{First word|Hear ye, users|sep=,}}Script error: No such module "String".
  • {{First word|1=len = a+b|sep==}}Script error: No such module "String".

See also

Template:Navbox with collapsible groups