fn len_of_first_n_chars(text: &str, n: usize) -> UTF8Bytes
Expand description

The length in bytes of the first n characters in a UTF-8 string.

If the string has fewer than n characters, returns the length of the whole string. If n is 0, returns 0