Skip to main content

split_by_face

Function split_by_face 

Source
pub fn split_by_face(
    text: &str,
    faces: &[ComposedFace],
) -> Vec<(usize, Option<usize>)>
Expand description

Splits text into the pieces each face of faces draws: (byte length, index into faces), None for a piece no face covers. Adjacent characters with the same answer are one piece; a continues_cluster character stays with the piece before it.