snap_to_char_boundary

Function snap_to_char_boundary 

Source
fn snap_to_char_boundary(s: &str, index: usize) -> usize
Expand description

Snap a byte index back to the nearest valid UTF-8 char boundary.