ben-strasser / fast-cpp-csv-parser

fast-cpp-csv-parser
BSD 3-Clause "New" or "Revised" License
2.15k stars 440 forks source link

Ignore values #11

Closed michael-customlbs closed 8 years ago

michael-customlbs commented 8 years ago

Sometimes I don't want to read all values. Is there a way to ignore columns e.g.:

int i;
in.read_row(i, io::ignore, io::ignore, io::ignore);

This would save me a lot of lines.

ben-strasser commented 8 years ago

Hi,

just do

char*ignore; ... in.read_row(i, ignore, ignore, ignore);

As this involves no copy it should be fast.

If you want to ignore all values of a column then using io::ignore_extra_column is probably better though.

Best Regards Ben Strasser

On Tue, 22 Dec 2015 02:41:44 -0800 Michael Schöndorfer notifications@github.com wrote:

Sometimes I don't want to read all values. Is there a way to ignore columns e.g.:

int i;
in.read_row(i, io::ignore, io::ignore, io::ignore);

This would save me a lot of lines.


Reply to this email directly or view it on GitHub: https://github.com/ben-strasser/fast-cpp-csv-parser/issues/11