authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-14 21:01:40-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-14 21:01:40-07:00
log4f5fa959aa80ce39828b8bf45098029ce818fda2
tree33e331e3fbd0b5db193e60668c37b88b94baf51f
parent3473e6dc261d1b03fc13c9e0cff2c2f8e14b5371

std.Io.Reader.streamDelimiterEnding docs clarification


1 files changed, 4 insertions(+), 2 deletions(-)

lib/std/Io/Reader.zig+4-2
......@@ -859,8 +859,10 @@ pub fn streamDelimiter(r: *Reader, w: *Writer, delimiter: u8) StreamError!usize
859859/// Appends to `w` contents by reading from the stream until `delimiter` is found.
860860/// Does not write the delimiter itself.
861861///
862/// Returns number of bytes streamed, which may be zero. End of stream can be
863/// detected by checking if the next byte in the stream is the delimiter.
862/// Returns number of bytes streamed, which may be zero. If the stream reaches
863/// the end, the reader buffer will be empty when this function returns.
864/// Otherwise, it will have at least one byte buffered, starting with the
865/// delimiter.
864866///
865867/// Asserts buffer capacity of at least one. This function performs better with
866868/// larger buffers.