Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

takeDelimiterInclusive

Returns a slice of the next bytes of buffered data from the stream until delimiter is found, advancing the seek position past the delimiter.

Returned slice includes the delimiter as the last byte.

Invalidates previously returned values from peek.

See also:

Reader.takeDelimiterInclusive
pub fn takeDelimiterInclusive(r: *Reader, delimiter: u8) DelimiterError![]u8

File

lib/std/Io/Reader.zig:806

Code

pub fn takeDelimiterInclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 {
    const result = try r.peekDelimiterInclusive(delimiter);
    r.toss(result.len);
    return result;
}