Skip to content

Commit e426ae4

Browse files
authored
Updated Utf8View example to format the single codepoint UTF-8 slice with {s} (#18288)
1 parent 7161ed7 commit e426ae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/unicode.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ pub fn utf8ValidateSlice(input: []const u8) bool {
312312
/// ```
313313
/// var utf8 = (try std.unicode.Utf8View.init("hi there")).iterator();
314314
/// while (utf8.nextCodepointSlice()) |codepoint| {
315-
/// std.debug.print("got codepoint {}\n", .{codepoint});
315+
/// std.debug.print("got codepoint {s}\n", .{codepoint});
316316
/// }
317317
/// ```
318318
pub const Utf8View = struct {

0 commit comments

Comments
 (0)