If I create a simple "data.txt" file containing this, with Windows newlines: 10 20 30 And I try to read it with slurp: import std.file: slurp; void main() { slurp!(int)("data.txt", "%d"); } I get a stack trace: object.Exception@...\dmd2\src\phobos\std\file.d(2992): Trailing characters at the end of line: ` ' --------- 0x00413C36 in pure @safe void std.exception.bailOut(immutable(char)[], uint, const(char[])) ...
pull : https://github.com/dlang/phobos/pull/6680
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9ca114d141bf0c8cdf949b10b7396653d649de6e fix issue 11431 - std.file.slurp fails with Windows newlines https://github.com/dlang/phobos/commit/f4c6d5c25e61684594036c2f959d70dcef325365 Merge pull request #6680 from BBasile/issue-11431 fix issue 11431 - std.file.slurp fails with Windows newlines merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>