Newbie: Error parsing csv file with very long lines

Ivan Kazmenko via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 23 05:20:15 PDT 2016


On Saturday, 23 April 2016 at 10:40:13 UTC, salvari wrote:
> It seems to be really simple, I read the columns name with no 
> problem. But as soon as the program parses the first line of 
> data, the array containing the columns names seems to be 
> overwrited.

Another possibility yet not mentioned is to change
foreach(line; stdin.byLine())
into
foreach(line; stdin.byLineCopy())
to make the older lines' contents available after you read the 
next line.



More information about the Digitalmars-d-learn mailing list