Skip to main content

wrap_breaks

Function wrap_breaks 

Source
pub fn wrap_breaks(chars: &[String], width: usize) -> Vec<(usize, usize)>
Expand description

Soft-wrap graphemes into (start, end) ranges of at most width display columns. Prefers breaking after a space; otherwise hard-breaks.