[Issue 11995] std.File.ByLine strips trailing empty line
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Fri Nov 27 08:32:34 PST 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=11995
bb.temp at gmx.com changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bb.temp at gmx.com
         Resolution|---                         |INVALID
--- Comment #5 from bb.temp at gmx.com ---
No, you forgot that the \n is part of the line:
your file is filled with:
"line 1\nline 2\n\n\n"
you expect byLine to output:
["line 1", "line 2", "", "", ""]
but "line 1\nline 2\n\n\n" contains **four** lines, not five:
line1\n
line2\n
\n
\n
--
    
    
More information about the Digitalmars-d-bugs
mailing list