On Friday, 8 May 2015 at 11:14:43 UTC, Robert burner Schadek wrote:
On Friday, 8 May 2015 at 11:00:01 UTC, Chris wrote:

I'm sure there is room for improvement.


It looks like your reading some kind of comma seperated values (csv).

have a look at std.csv of phobos

```
foreach(record;
file.byLine.joiner("\n").csvReader!(Tuple!(string, string, int)))
{
    writefln("%s works as a %s and earns $%d per year",
             record[0], record[1], record[2]);
}
```

Yeah, I actually wanted to have a closer look at std.csv. But in this case the input format may change (comments, keywords etc.), so I might need a customized parser anyway.
  • Chaining input Chris via Digitalmars-d-learn
    • Re: Chaining input Robert burner Schadek via Digitalmars-d-learn
      • Re: Chaining input Chris via Digitalmars-d-learn

Reply via email to