Strings In Depth11 / 18
Up next

There is no s[0]

fn main() {
    let s = "abc";
    // strings are not indexable by position; use bytes or chars
    let first_byte = s.as_bytes()[0];
    let first_char = s.chars().next().unwrap();
    println!("{first_byte} {first_char}");
}
What you're solving

index via bytes or chars, not [i]