Slices let you reference a contiguous sequence of elements in a collection rather than the whole collection. A slice is a kind of reference, so it does not have ownership.
Internally, the slice data structure stores the starting position and the length of the slice, which corresponds to *ending_index* minus *starting_index*.
Note: String slice range indices must occur at valid UTF-8 character boundaries. If you attempt to create a string slice in the middle of a multibyte character, your program will exit with an error.
a slice and a reference to a collection are equal