textUtf8ByteOffsetForOffset function
Converts a grapheme offset from the document start into a UTF-8 byte offset.
Implementation
int textUtf8ByteOffsetForOffset(TextDocument document, int offset) =>
TextUtf8CoordinateIndex(document).byteOffsetForOffset(offset);