added read-url

This commit is contained in:
2021-02-09 19:36:05 +01:00
parent 22f9410d17
commit 982241acf6
8 changed files with 315 additions and 7 deletions

23
clib/csvparser.h Normal file
View File

@@ -0,0 +1,23 @@
#include <string>
#include <vector>
class CsvParser {
private:
char field_separator;
char line_separator;
char line_separator2;
char quote_character;
bool skip_header;
bool header_skiped;
public:
CsvParser(bool skip_hdr = false, char field_sep = ',', char quote_ch = '"', char line_sep = '\r', char line_sep2 = '\n');
void parseCSV(const std::string &csvSource, std::vector< std::vector<std::string> > &lines);
private:
void addLine(const std::vector<std::string> &line, std::vector< std::vector<std::string> > &lines);
};