Function toss [src]
Skips the next n bytes from the stream, advancing the seek position. This
is typically and safely used after peek.
Asserts that the number of bytes buffered is at least as many as n.
The "tossed" memory remains alive until a "peek" operation occurs.
See also:
peek.
discard.
Prototype
pub fn toss(r: *Reader, n: usize) void
Parameters
r: *Reader
n: usize
Example
test toss {
var r: Reader = .fixed("abc");
r.toss(1);
try testing.expectEqualStrings("bc", r.buffered());
}
Source
pub fn toss(r: *Reader, n: usize) void {
r.seek += n;
assert(r.seek <= r.end);
}