Template:Str index
Jump to navigation
Jump to search
Usage
{{str index|text|number}} = Returns the number-th character of text. Base 1: the first character is numbered 1, and so on.
Only supports a limited character set. Returns an error on unknown characters. Returns   for a blank space.
Examples
{{str index|0123456789ABCDEF|15}}
→ E{{str index|0123456789ABCDEF|18}}
→ Template:FormattingError{{str len|{{str index|a b|2}}}}}}
→ 5 (because the return is 
rather than a space character.)
See also
Template:String templates see also
bg:Шаблон:Str index de:Vorlage:Str index es:Plantilla:Str index id:Templat:Str index ja:Template:Str index ko:틀:Str index pt:Predefinição:Str index ru:Шаблон:Str index sco:Template:Str index sl:Predloga:Str index
The above documentation is transcluded from Template:Str index/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |