Starting index refers to the first position in the slice (indexing starts with 0) and is inclusive
Ending index refers to a position that is one more than the last position of the slice and is exclusive
Its type is &str and is immutable
let s = String::from("hello world");
let hello = &s[0..5]; // "hello"
let world = &s[6..11]; // "world"
// "hello", 0 at the beginning can be ommitted
let hello = &s[..5];
// "world", going up to the last byte of the String
let world = &s[6..];
// "hello world", takes a slice of the entire String
let hello_world = &s[..];