Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 01:44, 19 July 2009 by commons>Vlsergey (Undid revision 302870883 by Vlsergey (talk) wrong wiki)

This template returns a certain number of characters from the start of a text string.

Usage

  • first parameter (compulsory) the text string to truncate
  • second parameter the number of characters to return. If invalid or empty, an empty string is returned. If undefined, it defaults to 1.

Examples

  • {{Str left| lorem ipsum dolor sit amet | 10 }} → lorem ipsu
  • {{Str left| lorem ipsum dolor sit amet | 1 }} → l
  • {{Str left| lorem ipsum dolor sit amet | foo }}
  • {{Str left| lorem ipsum dolor sit amet | }}
  • {{Str left| lorem ipsum dolor sit amet }} → l

See also

Equivalent to Template:Trunc. One is superior to the other - which?


Cookies help us deliver our services. By using our services, you agree to our use of cookies.