Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rluba/jai-csv
Tiny CSV module for Jai
https://github.com/rluba/jai-csv
csv jai parser
Last synced: 2 months ago
JSON representation
Tiny CSV module for Jai
- Host: GitHub
- URL: https://github.com/rluba/jai-csv
- Owner: rluba
- License: mit
- Created: 2020-11-16T15:29:12.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-31T13:57:19.000Z (over 1 year ago)
- Last Synced: 2024-08-02T11:22:02.186Z (5 months ago)
- Topics: csv, jai, parser
- Homepage:
- Size: 8.79 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiny CSV module for Jai
This tiny module has just three primary functions:
* `csv_parse` parses a CSV string into an array of any given type.
* `csv_escape` escapes a value (if needed) so that it can be safely written in to a CSV column.
* `append_csv_escaped` is similar to `csv_escape` but directly appends the (potentially escaped) value to a `String_Builder`.Currently, `csv_parse` can only parse into string, float, and integer members.
See [`module.jai`](./module.jai) for details.
## Memory model
You’re responsible for freeing everything (including strings) in the result array returned by `csv_parse`.
Using a Pool allocator around your `csv_parse` calls might be a good idea.