Template:Str left

From Toon Wiki
Template documentation (for the above template, sometimes hidden or invisible)
Description
Gives the <count> substring of characters from the start of the trimmed string (the substring has length <count>). If <count> is invalid, empty or zero, an empty string is returned. If undefined, it defaults to 1.
Only 500 characters can be extracted even if the <string> is longer.
Syntax
Type {{Str left|<string>|<count>}} somewhere.
Sample output
  • {{ 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 | 0 }}
  • {{ Str left | Lorem ipsum dolor sit amet | }}
  • {{ Str left | Lorem ipsum dolor sit amet }} → L
  • {{ Str left | Lorem ipsum dolor sit amet | 40 }} → Lorem ipsum dolor sit ametLorem ipsum do
  • {{ Str left | àçé | 2 }} → àç
This page uses Creative Commons Licensed content from Wikipedia (view authors).
Visit Template:Str left/doc to edit this text! (How does this work?)
Done editing it? Refresh this page! (Why?)