Translations:Extension:Scribunto/Lua reference manual/2157/en

Returns the byte offset of a character in the string. The default for both  and   is 1. may be negative, in which case it counts from the end of the string.