How Can We Help?
You are here:
< Back
0
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
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 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 8{{str letter|NR<ref>a reference</ref>}}
returns 2
{{str letter|abcdefghijklmnopqrstuvwx}}
returns 24{{str letter|abcdefghijklmnopqrstuvwxyz}}
returns 26
See also
String-handling templates (help page) | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
References
- ^ a reference
Categories
-
Annuals36
-
Bulbs, Corms & Tubers41
-
Ferns27
-
Fruits3
-
Garden Plants23
-
Grasses26
-
Herb17
-
Insects1
-
Mammals1
-
Midwest Native Plants0
-
Northeast Native Plants112
-
Perennials123
-
Rose1
-
Shrubs47
-
Trees112
-
Tropical Plants53
-
Upland Birds5
-
Vines18
-
Viola Tricolor1
-
Water Gardening & Plants9
-
Waterfowl0
-
Wetland Birds0
-
Wetland Plants4
-
Wildbirds172
-
Wildflowers1
-
Woodland Plants29
Table of Contents
Recent Comments