mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 08:33:06 +00:00
Updated Utf8View example to format the single codepoint UTF-8 slice with {s} (#18288)
This commit is contained in:
parent
7161ed79c4
commit
e426ae43ae
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user