pub fn is_valid_range<S, R>(s: S, range: &R) -> boolwhere S: AsRef<str>, R: RangeBounds<usize>,
Checks that range is valid for splitting the string slice s.
range
s
The range is valid if it fits within the slice and its bounds are on UTF-8 code point boundaries.