Function ropey::str_utils::char_to_byte_idx
source · [−]Expand description
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.
Runs in O(N) time.