← Back to archive

Stdle #146 · strings · 2026-10-30

What does this Rust snippet output?

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

fn main() {
let s = "ab".repeat(3);
println!("{} {}", s, s.len());
}
Strings
4 attempts left

Answer & explanation