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.

streamExact

"Pump" exactly n bytes from the reader to the writer.

Reader.streamExact
pub fn streamExact(r: *Reader, w: *Writer, n: usize) StreamError!void

File

lib/std/Io/Reader.zig:216

Code

pub fn streamExact(r: *Reader, w: *Writer, n: usize) StreamError!void {
    var remaining = n;
    while (remaining != 0) remaining -= try r.stream(w, .limited(remaining));
}