Skip to main content

find_boundary

Function find_boundary 

Source
pub fn find_boundary(s: &str, max: usize) -> usize
Expand description

Find a safe UTF-8 boundary position. Returns the largest position <= max that is a valid char boundary.