Template:Str letter
Jump to navigation
Jump to search
0
This documentation is transcluded from Template:Str letter/doc. (Edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
This is the {{str letter}} meta-template.
It takes a string as parameter, and returns its length of preceding letters.
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|12345abc}}
returns 0{{str letter|abcdef?}}
returns 0{{str letter|abc def}}
returns 0{{str letter|ABcD123}}
returns 0{{str letter|abc, def}}
returns 0{{str letter|abc(def)}}
returns 0{{str letter|abc xyzabcdefghijklmnopqrstuvwxyz}}
returns 0{{str letter|ĂbÄÄĂÄFÄ}}
returns 0{{str letter|NR<ref>a reference</ref>}}
returns 0
{{str letter|abcdefghijklmnopqrstuvwx}}
returns 0{{str letter|abcdefghijklmnopqrstuvwxyz}}
returns 0
See also
Template:String-handling templates
References
- â a reference