| author | |
| committer | |
| log | f36faa32c46897a12852da9f382ab10979511d6f |
| tree | f5838ce24e8f444695a94751e86f5e3eabea821b |
| parent | 3ce0ea884f8a64e1173ab814de10b6c33833b3b8 |
this reads N bytes, discarding their values1 files changed, 7 insertions(+), 0 deletions(-)
std/io.zig+7| ... | ... | @@ -200,6 +200,13 @@ pub fn InStream(comptime ReadError: type) type { |
| 200 | 200 | try self.readNoEof(input_slice); |
| 201 | 201 | return mem.readInt(input_slice, T, endian); |
| 202 | 202 | } |
| 203 | ||
| 204 | pub fn skipBytes(self: *Self, num_bytes: usize) !void { | |
| 205 | var i: usize = 0; | |
| 206 | while (i < num_bytes) : (i += 1) { | |
| 207 | _ = try self.readByte(); | |
| 208 | } | |
| 209 | } | |
| 203 | 210 | }; |
| 204 | 211 | } |
| 205 | 212 |