8 #include <boost/algorithm/string.hpp> 9 #include <boost/tokenizer.hpp> 15 using Tokenizer = boost::tokenizer<boost::escaped_list_separator<char>>;
25 for (
const auto &token : tokenizer)
27 entry.
values.push_back(boost::trim_copy(token));
34 std::vector<CsvRow> result;
36 std::ifstream in(csvFile.c_str());
41 while (getline(in, line))
46 result.push_back(entry);
54 std::vector<CsvRow> result;
56 for (
auto const& line: csvVector)
59 result.push_back(entry);
std::vector< std::string > values
CsvRow ParseLine(const std::string &csvLine)
static std::vector< CsvRow > ParseVector(const std::vector< std::string > &csvVector)
boost::tokenizer< boost::escaped_list_separator< char > > Tokenizer
static std::vector< CsvRow > ParseFile(const std::string &csvFile)