← Back to archive

Stdle #25 · strings · 2026-07-01

What does this Zig snippet output?

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

const std = @import("std");
pub fn main() void {
const s = "hello world";
const trimmed = std.mem.trim(u8, s, "hled");
std.debug.print("{s}\n", .{trimmed});
}
Strings
4 attempts left

Answer & explanation