StringSlice
A collection of methods to slice strings based on character indices rather than bytes.
This crate implements the StringSlice trait for &str,
which contains various methods to slice the string.
Examples
The slice method can be used to slice a &str.
use StringSlice;
assert_eq!;
assert_eq!;
The substring method is provided for convenience and accepts
separate parameters for the start and end of the slice.
use StringSlice;
assert_eq!;
There are also equivalent try_slice and try_substring methods
which return None for invalid input.
use StringSlice;
assert_eq!;