Jump to content

User:Patrick/Str index/doc

From Wikipedia, the free encyclopedia

Usage[edit]

{{str index|text|number}} = Returns the number-th character of text.

Only supports a limited character set. Returns an error on unknown characters. Returns   for a blank space.

Examples[edit]

  • {{str index|0123456789ABCDEF|15}} → E
  • {{str index|0123456789ABCDEF|18}}String Module Error: String index out of range
  • {{str len|p{{str index|a b|2}}q}} → 3
  • {{User:Patrick/Str index|0123456789ABCDEF|15}} → E
  • {{User:Patrick/Str index|0123456789ABCDEF|18}} → ((str index)): String is not long enough.
  • {{str len|p{{User:Patrick/Str index|a b|2}}q}} → 3

See also[edit]