fn splitScalar(comptime T: type, buffer: []const T, delimiter: T) SplitIterator(T, .scalar)

Returns an iterator that iterates over the slices of buffer that are separated by delimiter.

splitScalar(u8, "abc|def||ghi", '|') will return slices for “abc”, “def”, “”, “ghi”, null, in that order.

If delimiter does not exist in buffer, the iterator will return buffer, null, in that order.

See also: splitSequence, splitAny, splitBackwardsSequence, splitBackwardsAny,splitBackwardsScalar, tokenizeAny, tokenizeSequence, and tokenizeScalar.

Parameters

T: type,
buffer: []const T,
delimiter: T,