header_utils
Loading...
Searching...
No Matches

Functions

template<typename BUFFER , typename ROW_CALLBACK >
intptr_t ghassanpl::formats::csv::load (BUFFER &&buffer, ROW_CALLBACK &&row_callback)
 Loads a CSV text file from buffer, calling row_callback for each row.
 

Detailed Description

Function Documentation

◆ load()

intptr_t ghassanpl::formats::csv::load ( BUFFER &&  buffer,
ROW_CALLBACK &&  row_callback 
)

Loads a CSV text file from buffer, calling row_callback for each row.

Adheres to the CSV standard. It's definitely not the fastest CSV loader out there, but has a simple API. Will not throw any errors by itself.

Parameters
bufferEither a string_view or an istream
row_callbackCalled for each row, must take arguments convertible to (size_t row_num, std::vector<std::string> row_cells)

Definition at line 43 of file formats.h.