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

See mw.ustring.sub for a similar function in which the offsets are characters rather than bytes.