pub fn takeDelimiterExclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 r: *Readerdelimiter: u8ReadFailedSee the Reader implementation for detailed diagnostics.
EndOfStreamFor "inclusive" functions, stream ended before the delimiter was found. For "exclusive" functions, stream ended and there are no more bytes to return.
StreamTooLongThe delimiter was not found within a number of bytes matching the capacity of the Reader.
876
877
878
879
880pub fn takeDelimiterExclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 {
const result = try r.peekDelimiterExclusive(delimiter);
r.toss(result.len);
return result;
}
Returns a slice of the next bytes of buffered data from the stream until
delimiteris found, advancing the seek position up to (but not past) the delimiter.Returned slice excludes the delimiter. End-of-stream is treated equivalent to a delimiter, unless it would result in a length 0 return value, in which case
error.EndOfStreamis returned instead.If the delimiter is not found within a number of bytes matching the capacity of this
Reader,error.StreamTooLongis returned. In such case, the stream state is unmodified as if this function was never called.Invalidates previously returned values from
peek.See also:
takeDelimitertakeDelimiterInclusivepeekDelimiterExclusive