Skip to main content

wrap_ranges_trim

Function wrap_ranges_trim 

Source
pub fn wrap_ranges_trim<'a, O>(
    text: &str,
    width_or_options: O,
) -> Vec<Range<usize>>
where O: Into<Options<'a>>,
Expand description

Like wrap_ranges but returns ranges without trailing whitespace and without the sentinel extra byte. Suitable for general wrapping where trailing spaces should not be preserved.