From e426ae43aec0e57ddbdde9813365cad0394a0030 Mon Sep 17 00:00:00 2001 From: davideger Date: Mon, 1 Jan 2024 15:47:27 -0800 Subject: [PATCH] Updated Utf8View example to format the single codepoint UTF-8 slice with {s} (#18288) --- lib/std/unicode.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/unicode.zig b/lib/std/unicode.zig index 1c0c6b32ac..07aa63cac8 100644 --- a/lib/std/unicode.zig +++ b/lib/std/unicode.zig @@ -312,7 +312,7 @@ pub fn utf8ValidateSlice(input: []const u8) bool { /// ``` /// var utf8 = (try std.unicode.Utf8View.init("hi there")).iterator(); /// while (utf8.nextCodepointSlice()) |codepoint| { -/// std.debug.print("got codepoint {}\n", .{codepoint}); +/// std.debug.print("got codepoint {s}\n", .{codepoint}); /// } /// ``` pub const Utf8View = struct {