Template:Str left/doc
From FORwiki
(Difference between revisions)
(Created page with '{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> === Usage === <code>{{Tlx|Str left|<string>|<count>}}</code> Gives the <coun...') |
|||
(One intermediate revision not shown) |
Current revision as of 02:57, 14 January 2010
Usage
{{Str left|<string>|<count>}}
Gives the <count> characters from the start of the string.
If <count> is invalid or empty, an empty string is returned. If undefined, it defaults to 1.
Examples
- {{Str left| lorem ipsum dolor sit amet | 10 }} →
- {{Str left| lorem ipsum dolor sit amet | 1 }} →
- {{Str left| lorem ipsum dolor sit amet | foo }} →
- {{Str left| lorem ipsum dolor sit amet | }} →
- {{Str left| lorem ipsum dolor sit amet }} →