is_valid_range

Function is_valid_range 

Source
pub fn is_valid_range<S, R>(s: S, range: &R) -> bool
where S: AsRef<str>, R: RangeBounds<usize>,
Expand description

Checks that range is valid for splitting the string slice s.

The range is valid if it fits within the slice and its bounds are on UTF-8 code point boundaries.