split_str_with_ranges

Function split_str_with_ranges 

Source
pub fn split_str_with_ranges(
    s: &str,
    pat: impl Fn(char) -> bool,
) -> Vec<(Range<usize>, &str)>
Expand description

Similar to str::split, but also provides byte-offset ranges of the results. Unlike str::split, this is not generic on pattern types and does not return an Iterator.