Review of Jesse Phillips's CSV Parser
Jacob Carlborg
doob at me.com
Fri Oct 28 07:07:47 PDT 2011
On 2011-10-28 15:18, dsimcha wrote:
> Formal review of Jesse Phillips's CSV parser module begins today and
> runs through November . Following that, a vote will take place for one
> week. Please post any comments about this library in this thread.
>
> Docs:
> http://nascent.freeshell.org/programming/D/doc/phobos/std_csv.html
>
> Code:
> https://github.com/he-the-great/phobos/tree/csv
If a header is specified, is it possible to iterate over the content as
an associative array, something like this:
string str = "a,b,c\nHello,65,63.63\nWorld,123,3673.562";
auto records = csvText(str, ["b"]);
foreach (header, value ; records) {}
Or accessing a value by header:
foreach (record ; records)
{
auto value = record["a"];
auto val = record.b; // perhaps using opDispatch as well
}
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list