changes here and there
This commit is contained in:
31
csvreader.h
Normal file
31
csvreader.h
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
|
||||
namespace usql {
|
||||
|
||||
class CsvReader {
|
||||
|
||||
private:
|
||||
char field_separator;
|
||||
char line_separator;
|
||||
char line_separator2;
|
||||
char quote_character;
|
||||
|
||||
bool skip_header;
|
||||
bool header_skiped;
|
||||
|
||||
public:
|
||||
CsvReader(bool skip_hdr = false, char field_sep = ',', char quote_ch = '"', char line_sep = '\r',
|
||||
char line_sep2 = '\n');
|
||||
|
||||
std::vector<std::vector<std::string>> parseCSV(const std::string &csvSource);
|
||||
|
||||
private:
|
||||
void add_line(const std::vector<std::string> &line, std::vector<std::vector<std::string>> &lines);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user