A byte is eight bits. Each bit can be 0 or 1. Rust integer type names show their size in bits: `u8` uses one byte, while `i64` uses eight bytes. section 1.3
What fits in one byte?
The eight bits of a `u8` can all be set to 1. Their values add up to 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255, the largest `u8` value. section 1.3
fn main() {
let str1 = "Hello!";
println!("str1 is {} bytes and also {} characters.", str1.len(), str1.chars().count());
let str2 = "안녕!";
println!("str2 is {} bytes but only {} characters.", str2.len(), str2.chars().count());
}
Try the string-length example: `.len()` counts bytes, while `.chars().count()` counts characters. `"Hello!"` has six of each; `"안녕!"` has seven bytes but three characters. section 1.3






