You can get 1 character string[i..i+1]
, strings can't be indexed because multiple bytes may make up a single visual character and Rust doesn't want to make that decision. Another way is string.chars().nth(i)
You can get 1 character string[i..i+1]
, strings can't be indexed because multiple bytes may make up a single visual character and Rust doesn't want to make that decision. Another way is string.chars().nth(i)