Go to the documentation of this file.
33 char * is_fmt_unsigned;
46 int rows_count, cols_count;
53 static Stream * debug_serial;
55 bool whole_csv_supplied;
65 char * parseStringValue(
const char *,
int * chars_occupied);
66 void saveNewValue(
const char * val,
char type_specifier,
int row,
int col,
bool is_unsigned);
68 static int8_t getTypeSize(
char type_specifier);
69 static const char * getTypeName(
char type_specifier,
bool is_unsigned);
71 void AssignIsFmtUnsignedArray(
const char * fmt_);
74 static char * strdup_ignoring_u(
const char *s);
75 static size_t strlen_ignoring_u(
const char *s);
76 static char * strdup_trimmed(
const char * s);
83 void supplyChunk(
const char *s);
100 CSV_Parser(
const char * s,
const char * fmt,
bool has_header=
true,
char delimiter=
',',
char quote_char=
'"');
105 CSV_Parser(
const char * s,
const char * fmt,
bool hh,
char d,
const char * qc) :
CSV_Parser(s, fmt, hh, d, qc[0]) {}
150 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:92
CSV_Parser & operator<<(const char *s)
It's the same as supplyChunk(s) but allows to use operator instead of method call,...
Definition: CSV_Parser.cpp:412
void * getValues(const char *key)
Gets values given the column key name.
CSV_Parser(const char *fmt_, bool hh, char d, const char *qc)
Definition: CSV_Parser.h:109
int getRowsCount()
Excluding header (if it was part of supplied CSV).
Definition: CSV_Parser.cpp:260
void print(Stream &ser=Serial)
Prints whole parsed content including:
Definition: CSV_Parser.cpp:275
void parseLeftover()
Forces the previously supplied (but not parsed) chunks to be parsed despite not ending with "\n" or "...
Definition: CSV_Parser.cpp:425
CSV_Parser(const char *s, const char *fmt, bool has_header=true, char delimiter=',', char quote_char='"')
Definition: CSV_Parser.cpp:66
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:263
void * getValues(int col_index)
Gets values given the column index.
Definition: CSV_Parser.h:28
int getColumnsCount()
Definition: CSV_Parser.cpp:259
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:105
CSV_Parser(const char *fmt_, bool hh=true, char d=',', char qc='"')
Constructor for supplying csv string by chunks.
Definition: CSV_Parser.h:108
void printKeys(Stream &ser=Serial)
Definition: CSV_Parser.cpp:253