On November 27th, 2022, the 8,000th article was added to the SuccuWiki!
Template:Str left/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 6: | Line 6: | ||
: <code>{{Tlx|Str left|<string>|<count>}}</code> | : <code>{{Tlx|Str left|<string>|<count>}}</code> | ||
Gives the <count> substring of characters from the start of the | 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. | If <count> is invalid, empty or zero, an empty string is returned. If undefined, it defaults to 1. |
Latest revision as of 12:00, 10 October 2012
This is a documentation subpage for Template:Str left. It contains usage information, categories, interlanguage links and other content that is not part of the original template page. |
Usage
{{Str left|<string>|<count>}}
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.
Limitations
- Length to 500: The maximum substring stops at 500 long, yet gives no error message. Only 500 characters can be extracted even if the <string> is longer.
- Inexpensive (uses no other templates).