Re: File.byLine for either Windows / Unix newlines

2017-12-11 Thread Dennis via Digitalmars-d-learn
Thanks for your reply, that clears it up. On Monday, 11 December 2017 at 21:13:11 UTC, Steven Schveighoffer wrote: 3. Stop using Windows ;) Haha, if only the rest of the userbase would follow.

Re: File.byLine for either Windows / Unix newlines

2017-12-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/11/17 10:40 AM, Dennis wrote: I'm on Windows and I recently got confused by how Phobos functions handle newlines. ``` void main() {     import std.stdio;     import std.path : buildPath, tempDir;     auto path = buildPath(tempDir(), "test.txt");     auto file = new File(path, "w");

File.byLine for either Windows / Unix newlines

2017-12-11 Thread Dennis via Digitalmars-d-learn
I'm on Windows and I recently got confused by how Phobos functions handle newlines. ``` void main() { import std.stdio; import std.path : buildPath, tempDir; auto path = buildPath(tempDir(), "test.txt"); auto file = new File(path, "w"); file.write("hello there!\n"); //act