Skip to main content

prev_char_boundary

Function prev_char_boundary 

pub fn prev_char_boundary(text: &str, byte_idx: usize) -> usize
Expand description

Step one user-perceived character to the left of byte_idx. Extended grapheme clusters keep combining marks, emoji modifiers, flags, and ZWJ sequences together. The legacy function name is retained for API compatibility.