Template:Strpos/doc

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search
Template:Strpos invokes Module:String using Lua.

The character at a specified index in a string

Use[edit source]

{{Strpos|string|index}}

string
the string whose character to return
index
the position of the character to return; an integer between 1 and the length of the string; negative numbers specify a position from the end of the string

Example[edit source]

{{Strpos|abcde|2}}

produces

b