fn second_word(s: &String) -> &str {
    let bytes = s.as_bytes();
    let mut k = 0;
    let mut n =0;
    for (i, &item) in bytes.iter().enumerate() {
        if item == b' ' {
            k = k + 1;
            if k == 1 {
                n = i;
            }
            else if k == 2 {
                return &s[1+n..i];
            }

        }
    }

    &s[..]
}

the code looks like shit

By big_shaq123, 2022-05-10 15:27:32