fn next_utf8(text: &str, i: usize) -> usize {
    let b = match text.as_bytes().get(i) {
        None => return i + 1,
        Some(&b) => b,
    };
    i + codepoint_len(b)
}
/// Returns the smallest possible index of the next valid UTF-8 sequence
/// starting after `i`.
/// Adapted from a function with the same name in the `regex` crate.
Returns the smallest possible index of the next valid UTF-8 sequence
starting after `i`.
Adapted from a function with the same name in the `regex` crate.
Returns the smallest possible index of the next valid UTF - 8 sequence starting after ` i ` . Adapted from a function with the same name in the ` regex ` crate .
fn next_utf8(text: &str, i: usize) -> usize {
    let b = match text.as_bytes().get(i) {
        None => return i + 1,
        Some(&b) => b,
    };
    i + codepoint_len(b)
}
fn next_utf8 ( text : & str , i : usize ) -> usize { let b = match text . as_bytes ( ) . get ( i ) { None => return i + 1 , Some ( & b ) => b , } ; i + codepoint_len ( b ) }
Returns the smallest possible index of the next valid UTF-8 sequence
starting after `i`.
Returns the smallest possible index of the next valid UTF - 8 sequence starting after ` i ` .
text
&str
i
usize
text
&str
i
usize