Hey, so today I have been playing with file IO, and while trying to read a file line by line on Windows platform, I’ve noticed that, for a Reader interface, delimiter is only in character long, while for std.mem.tokenize, delimiter is a basically a string.
I’m specifically talking about Windows, because currently it’s not possible to specify “\r\n” as a delimiter. Instead, you basically have to trim the “\r” after using the “\n” as a delimiter, which would be unneccessary if we had a string delimiter for a Reader interface.
Speaking of Reader interface, docs for readUntilDelimiterOrEof this →
“/// Deprecated: use streamUntilDelimiter
with ArrayList’s writer instead.”
However, streamUntilDelimiter writes just until it finds the first delimiter, and basically skips rest of the bytes after that first delimiter, so it seems what’s missing is streamUntilDelimiterOrEof.