sub(
str,i,j) ->substring,err
Extract a substring by UTF-8 character indices, ignoring ANSI escapes
Extracts a substring from str using UTF-8 character indices (not bytes).
Negative indices count from the end. Returns nil and an error message if
the string or index is missing.