My proposal was not having the same function implemented differently per system, but have a system-specific function in each system’s os::*
crate. The global io-function should then be as system-agnostic as possible.
Do you mean std::os::unix
and std::os::windows
? These are only available on the corresponding platform, while there is no reason to limit availability of any line-break style. For example, CR LF is used on Windows but also in HTTP.
Any progress here? I don’t see any conclusion. I read logs made on windows and have to deal with CRLF somehow.
So is the current solution the same - using ::lines()
and trim somehow the trailing CR?
We are trying to decide what to do right now (this week), either change lines()
to trim \r
too, or add another method proposed to be called .lines_any()
that does that.
This is how Java seems to handle it btw.
But the flag is in the BufferedReader
class, not int the Std-Input stream itself.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.