Closed wmcnamara closed 2 years ago
Hi,
there is the LineReader(const charfile_name, const chardata_begin, const char*data_end) constructor, which parses an in-memory file. For anything more complex, you can derive from ByteSourceBase and implement your byte reading logic there.
You cannot parse lines interactively, as the reader has a large internal buffer and fills this buffer before doing any parsing.
Ok, I see.
Can you provide a small example on using this LineReader constructor to read CSV data similar to my usecase if its no trouble? I'm just a bit confused on how to actually get it up and running
vector<char>buffer;
LineReader("string used as file name in error messages", buffer.data(), buffer.data()+data.size());
Is there a way to parse just a single std::string row without loading a file?
It looks like the linereader class constructors all want filepaths, but I have a std::string with the row that I need to parse. Does this library provide a way to parse this?
Example: