Utf8View iterates the code points of a utf-8 encoded string.

var utf8 = (try std.unicode.Utf8View.init("hi there")).iterator();
while (utf8.nextCodepointSlice()) |codepoint| {
  std.debug.print("got codepoint {}\n", .{codepoint});
}

Fields

bytes: []const u8,

Functions

fn init(s: []const u8) !Utf8View

No documentation provided.

fn initComptime(comptime s: []const u8) Utf8View

TODO: https://github.com/ziglang/zig/issues/425

fn initUnchecked(s: []const u8) Utf8View

No documentation provided.

fn iterator(s: Utf8View) Utf8Iterator

No documentation provided.