Template:Str letter/doc
From Kerbal Space Program Wiki
Error creating thumbnail: /bin/bash: rsvg-convert: command not found |
This is a documentation subpage for Template:Str letter. It contains usage information, categories and other content that is not part of the original template page. |
This template uses material from the Wikipedia template Template:Str letter/doc, which is released under the Creative Commons Attribution-ShareAlike 3.0 Unported License (view authors). | Error creating thumbnail: /bin/bash: rsvg-convert: command not found |
This is the {{str letter}} meta-template.
It takes a string as parameter, and returns its length of preceding letters. It can count up to 25 in length, and returns 25 for strings that are too long.
Examples
If the parameter is empty or undefined it is considered to be of zero length:
{{str letter}}
returns 0{{str letter|}}
returns 0{{str letter| }}
returns 0
The count is interrupted by numbers, symbols, and punctuation:
{{str letter|12345}}
returns 0{{str letter|abcdef?}}
returns 6{{str letter|abc def}}
returns 3{{str letter|ABcD123}}
returns 4{{str letter|abc, def}}
returns 3{{str letter|abc(def)}}
returns 3{{str letter|abc xyzabcdefghijklmnopqrstuvwxyz}}
returns 3{{str letter|ÁbČĐÈęFğ}}
returns 0{{str letter|NR<ref>a reference</ref>}}
returns 16
It can measure strings up to 25 in length, and returns 25 for strings that are too long:
{{str letter|abcdefghijklmnopqrstuvwx}}
returns 24{{str letter|abcdefghijklmnopqrstuvwxyz}}
returns 25
See also
Description of all string templates
References
- ↑ a reference