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

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