[][src]Function ropey::str_utils::char_to_byte_idx

pub fn char_to_byte_idx(text: &str, char_idx: usize) -> usize

Converts from char-index to byte-index in a string slice.

Any past-the-end index will return the one-past-the-end byte index.