Template:Strlen short
0
The Template:Strlen_short gives the length of parameter 1, as a string, with a count of 0-50 characters, using a simple, quick method. The template was designed to use only 2 levels of expansion depth, rather than 9-13 or more levels as in other string-length templates.
- Usage: {{strlen short|abcdef}} Template:In5 → 6
- {{strlen short|123456789.}} → 10
- {{strlen short|2.4| extra= -1}} → 3
The optional parameter "extra= -1" can be used to return a specific value when a string exceeds the 50-character limit. The default result is -1 to indicate a string longer than 50 characters.
See also
badlo- {{Strlen_quick}} - to get string lengths quickly up to 0-70, but has expansion depth 5.
- {{Str len}} - handles strings up to 500 long, but with expansion depth 9-13 or more.