← Back to archive

Stdle #19 · strings · 2026-06-25

What does this Rust snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

fn main() {
let s = "é"; // 2 bytes, 1 char
println!("{} {}", s.bytes().count(), s.chars().count());
}
Strings
4 attempts left

Answer & explanation