Skip to content

gdavidbutler/csvTrivialCallbackParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csvTrivialCallbackParser

Trivial CSV callback parser in standard C.

No dependencies. No dynamic memory allocation. No recursion. No memory copying. Small and Fast.

This parser has a few differences from RFC 4180:

  • It allows double quote delimited text anywhere in a value, not only the first and last characters.
  • It allows any number of CR or NL to separate rows.
  • It requires at least one CR or NL to terminate the last row.

To check that a CSV string can be parsed, use a NULL callback and verify the return offset is the same as the source length.

Some examples of using this:

  • test/coders.c: example of using the coders.
  • test/main.c: example of checking (./main 0 test/test.csv) and parsing CSV (./main 1 test/test.csv).

About

Trivial CSV callback parser

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published