Releases: michalmonday/CSV-Parser-for-Arduino
1.4.1
New functions to allow parsing row by row from multiple sources:
cp.setRowParserFinishedCallback(func_returning_bool);
// only one of these should be used at once:
cp.setFeedRowParserCallback(func_returning_char);
cp.setFeedRowParserStrCallback(func_returning_char_pointer);
// I added "Str" version because it is faster in practice when a whole string is supplied
// rather than single character.
Non arduino adaptations allowing to test the code on a normal computer.
Bug fix (supplying char by char broke quotes parsing)
Bug fix (supplying char by char broke quotes parsing)
1.2.2
Got rid of compilation warnings
Thanks to Jusufs and RealJamieRI.
#21
parseRow() efficiency + related realloc fix
Modified examples show how to efficiently parse row by row:
https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/parsing_row_by_row
https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/parsing_row_by_row_sd_card
Lack of values initialization made it impossible to get pointer to values before the first cp.parseRow()
, this got fixed in this release.
Integer based indexing should be used to get pointer to values when using row by row parsing (because header is parsed after the first call of parseRow). See examples from links above for more details about correct usage.
parseRow() memory leak fix
Fixed with this commit:
7569694
Parsing row by row
Quote char bug fixes
Bug 1:
Parsing failed when quotes were used and a delimiter was not a comma
(due to using hardcoded comma in one condition...).
Big thanks to KingBoomie for reporting the issue.
Bug 2:
Parsing failed when four quote characters were within quoted string (for
the purpose of including two quote characters within the parsed string itself).
<< operator supports more types
Default behavior of cp << 97;
is changed from being treated as a
into being treated as 97
, this may break existing code (e.g. if return of file.read() isn't casted to (char)
), hence the major version number change.
Memory leak fix (thanks to foster066)
Added "free(is_fmt_unsigned)" in destructor.