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

تعديل
  • {Foo → Foo
  • {Foo → Foo
  • {Foo-bar-baz → Foo-bar-baz
  • {Foo → Foo
  • {34 → 34
  • {len → len
  • {Hear ye → Hear ye

Performance considerations

تعديل

The template has been optimized to run very quickly, with template expansion depth of 11 levels. The search for the word separator is run only once, with قالب:Strfind short used to scan the first 25 characters. Performance has been optimized by using قالب:Strloc prefix to find then extract the first word, else return the whole when not found.

See also

تعديل

Description of all string templates