On Thursday, approximately 10AM UTC, we'll be performing our MediaWiki 1.34 deployment. Please expect some downtime, we apologise in advance for any inconvenience!

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]

{{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]

{{Strpos|abcde|2}}

produces

b