← Back to archive

Stdle #87 · strings · 2026-09-01

What does this Rust snippet output?

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

fn main() {
let s = String::from("rustlang");
let slice = &s[0..4];
println!("{}", slice);
}
Strings
4 attempts left

Answer & explanation