Go to the documentation of this file.
31 int rows_count, cols_count;
38 static Stream * debug_serial;
40 void parseHeader(
const char *,
int * chars_occupied);
41 char * parseStringValue(
const char *,
int * chars_occupied);
42 void removeEnclosingDoubleQuotes(
char *);
43 void saveNewValue(
const char * val,
char type_specifier,
int row,
int col);
45 int countRows(
const char *s);
47 static int8_t getTypeSize(
char type_specifier);
48 static const char * getTypeName(
char type_specifier);
65 CSV_Parser(
const char * s,
const char * fmt,
bool has_header=
true,
char delimiter=
',',
char quote_char=
'"');
71 CSV_Parser(
const char * s,
const char * fmt,
bool hh,
char d,
const char * qc) :
CSV_Parser(s, fmt, hh, d, qc[0]) {}
112 void print(Stream &ser = Serial);
~CSV_Parser()
Releases all dynamically allocated memory. Making values unusable once the CSV_Parser goes out of s...
Definition: csv_parser.cpp:55
static void setDebugSerial(Stream &ser)
If invalid parameters are supplied to this class, then debug serial is used to output error informati...
Definition: csv_parser.h:119
int getRowsCount()
Excluding header (if it was part of supplied CSV).
Definition: csv_parser.cpp:237
void print(Stream &ser=Serial)
Prints whole parsed content including:
Definition: csv_parser.cpp:262
CSV_Parser(const char *s, const char *fmt, bool has_header=true, char delimiter=',', char quote_char='"')
Definition: csv_parser.cpp:5
void * operator[](const char *key)
It's the same as GetValues(key) but allows to use operator instead of method call,...
Definition: csv_parser.cpp:247
void * getValues(const char *key)
Gets values given the column key name.
Definition: csv_parser.cpp:239
Definition: csv_parser.h:26
int getColumnsCount()
Definition: csv_parser.cpp:236
CSV_Parser(const char *s, const char *fmt, bool hh, char d, const char *qc)
Additional constructor to allow supplying quote char as a string. Why? Because supplied quote char ...
Definition: csv_parser.h:71
void printKeys(Stream &ser=Serial)
Definition: csv_parser.cpp:230