Sum informations in file....
Suliman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 24 11:04:34 PST 2014
I can't understand why foreach loop produce every line by line,
while it's fuctional analog print lines on one string:
foreach(f; file.byLine())
{
writeln(f);
}
auto file = File("foo.txt","r");
file
.byLine()
.writeln;
file content:
-------------
first sring
second string
-------------
Output:
D:\code\JSONServer\source>app.exe
["first sring", "second string"]
expected:
first sring
second string
More information about the Digitalmars-d-learn
mailing list