Strings In Depth16 / 19
Up next

Split on a sequence

const std = @import("std");

pub fn main() void {
    const s = "a::b::c";
    // the separator here is two bytes long
    var it = std.mem.splitSequence(u8, s, "::");
    while (it.next()) |part| std.debug.print("{s}\n", .{part});
}
What you're solving

splitSequence uses a multi-byte separator