Function char_num

Function Documentation

usize char_num(string, usize)

Byte offset to character number. Given a byte-offset from the start of a UTF-8 string, return how many characters/runes precede it.