c0
C0DATA — structured data using ASCII C0 control codes (C)
Loading...
Searching...
No Matches
c0_csv.h
Go to the documentation of this file.
1/* c0_csv.h — CSV ⇄ C0DATA conversion. */
2#ifndef C0_CSV_H
3#define C0_CSV_H
4
5#include "c0.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
18uint8_t *c0_from_csv(const char *csv, size_t csv_len, const char *group_name, size_t *out_len);
19
30char *c0_to_csv(const uint8_t *buf, size_t len, const char *group_name, size_t *out_len, c0_error *err);
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif /* C0_CSV_H */
char * c0_to_csv(const uint8_t *buf, size_t len, const char *group_name, size_t *out_len, c0_error *err)
A group → CSV text: the header row first when the group has one, then its records.
uint8_t * c0_from_csv(const char *csv, size_t csv_len, const char *group_name, size_t *out_len)
CSV text (RFC 4180 quoting) → C0DATA: one group with a header row from the first CSV row and a positi...
Error detail: the code, the byte offset it was found at, and a static message.
Definition c0.h:91