authorgravatar for david.eger@gmail.comdavideger <david.eger@gmail.com> 2024-01-01 15:47:27-08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-01-01 18:47:27-05:00
loge426ae43aec0e57ddbdde9813365cad0394a0030
tree03b4f6b046ea25ad6f1b920df0bf04a9d601c630
parent7161ed79c4abcaccdd56fe0b4fbd3d93472d41b8
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Updated Utf8View example to format the single codepoint UTF-8 slice with {s} (#18288)


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/unicode.zig+1-1
......@@ -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/// ```
318318pub const Utf8View = struct {