the type `str` cannot be indexed by `usize` code example Example: how to index a string in rust num_string.chars().nth(i).unwrap()