Function tidb_query_expr::impl_string::get_utf8_byte_index[][src]

fn get_utf8_byte_index(s: &str, char_idx: usize) -> usize

Returns the byte index of the char at char_idx in s. If char_idx is larger then the number of UTF-8 chars in s, the length of s in bytes is returned.