writeAll
Function parameters
Parameters
- ais:*AutoIndentingStream
- bytes:[]const u8
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
pub fn writeAll(ais: *AutoIndentingStream, bytes: []const u8) Error!void {
if (bytes.len == 0) return;
try ais.applyIndent();
if (ais.disabled_offset == null) try ais.underlying_writer.writeAll(bytes);
if (bytes[bytes.len - 1] == '\n') ais.resetLine();
}