csv2
csv2 copied to clipboard
Fast CSV parser and writer for Modern C++
Some parsed string include "\r". The handling of end of lines should be improved.
`cell` variable is unused here, I replaced range-based for with regular loop to silence it.
with c a CellIterator, clang fails on c->fun(...). (c*).fun(...) compiles. msvc accepts both.
Rather than building a full string, returning a string view may be more efficient in some cases (suppose one wants to drop a column). Something like: class Cell { [...]...
I use csv.mmap(filename) to read csv file. When the input file is empty (size 0), I expect a zero length output. ``` if (csv.mmap(fileName)) { for (const auto row :...
Figured the example in the readme should work out of the box and not have to use a custom `trim_characters`
## problem1 ``` int,string 1, ``` One less column is parsed, the last column should be null ## problem2 ``` int,string,int 1,"",123 ``` There are 3 columns in total, but...
I try read Denver Crime Data example file crime.csv,the first line get wrong col number.The header has 19 cols,but read 18 cols. Debug the source,in file reader.hpp line Code: quote_opened...
In file included from /tmp/tmp.RkhsHRAu07/main.cpp:2:0: /tmp/tmp.RkhsHRAu07/csv2/reader.hpp: In instantiation of ‘bool csv2::Reader::mmap(StringType&&) [with StringType = const char (&)[8]; delimiter = csv2::delimiter; quote_character = csv2::quote_character; first_row_is_header = csv2::first_row_is_header; trim_policy = csv2::trim_policy::trim_characters]’: /tmp/tmp.RkhsHRAu07/main.cpp:13:27:...
First thanks for this wonderful library. It's very fast comparing to other csv parsers. The issue is when the reader parses the following line (note that this is the last...