bufferedByLine

bufferedByLine is a performance enhancement over std.stdio.File.byLine. It works by reading a large buffer from the input stream rather than just a single line.

The file argument needs to be a File object open for reading, typically a filesystem file or standard input. Use the Yes.keepTerminator template parameter to keep the newline. This is similar to stdio.File.byLine, except specified as a template paramter rather than a runtime parameter.

Reading in blocks does mean that input is not read until a full buffer is available or end-of-file is reached. For this reason, bufferedByLine is not appropriate for interactive input.

bufferedByLine
(
KeepTerminator keepTerminator = No.keepTerminator
Char = char
ubyte terminator = '\n'
size_t readSize = 1024 * 128
size_t growSize = 1024 * 16
)
(
File file
)
if (
is(Char == char) ||
is(Char == ubyte)
)

Meta