When fd.read() is invoked with a single-character string argument, invoke getdelim() internally to read the input until the give character or EOF. This is useful for reading character delimited input data.
For example fd.read('\n') will read any data up to the first newline (or EOF) while fd.read('\0x00') will read until the first null byte.
When
fd.read()
is invoked with a single-character string argument, invokegetdelim()
internally to read the input until the give character or EOF. This is useful for reading character delimited input data.For example
fd.read('\n')
will read any data up to the first newline (or EOF) whilefd.read('\0x00')
will read until the first null byte.Signed-off-by: Jo-Philipp Wich jo@mein.io