الگو:Str letter

0

توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

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ویرایش

Referencesویرایش

  1. a reference