Function byte_offset

Function Documentation

usize byte_offset(string, usize)

Character number to byte offset. Given the n-th character/rune in a string, how many bytes is that from the start of a UTF-8 string.