fn SplitIterator(comptime T: type, comptime delimiter_type: DelimiterType) type

Parameters

T: type,
delimiter_type: DelimiterType,

Fields

buffer: []const T,
index: ?usize,
delimiter: switch (delimiter_type) {
            .sequence, .any => []const T,
            .scalar => T,
        },

Functions

fn first(self: *Self) []const T

Returns a slice of the first field. This never fails. Call this only to get the…

Returns a slice of the first field. This never fails. Call this only to get the first field and then use next to get all subsequent fields.

fn next(self: *Self) ?[]const T

Returns a slice of the next field, or null if splitting is complete.

fn peek(self: *Self) ?[]const T

Returns a slice of the next field, or null if splitting is complete. This metho…

Returns a slice of the next field, or null if splitting is complete. This method does not alter self.index.

fn reset(self: *Self) void

Resets the iterator to the initial slice.

fn rest(self: Self) []const T

Returns a slice of the remaining bytes. Does not affect iterator state.