Commit e426ae43ae

davideger <david.eger@gmail.com>
2024-01-02 00:47:27
Updated Utf8View example to format the single codepoint UTF-8 slice with {s} (#18288)
1 parent 7161ed7
Changed files (1)
lib
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 {