Returns a substring of the UTF-8 string s, starting from the Unicode code point offset, of Unicode code point length. The substring is a copy of the original bytes.

For example, substr("%u{3b1}%u{3b2}%u{3b3}", 1, 1) is "β". See substr() for the exact semantics of the offset and length.

If the input string is not valid UTF-8, an unset value is returned.


utf8.substr(STRING s, INTEGER offset [, INTEGER length])