29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
31#include <mstdlib/base/m_buf.h>
32#include <mstdlib/base/m_list_str.h>
121M_API
M_csv_t *
M_csv_parse(
const char *data,
size_t len,
char delim,
char quote, M_uint32 flags) M_MALLOC;
struct M_buf M_buf_t
Definition: m_buf.h:77
M_csv_t * M_csv_parse_add_headers(const char *data, size_t len, char delim, char quote, M_uint32 flags, M_list_str_t *headers)
M_csv_t * M_csv_parse_inplace(char *data, size_t len, char delim, char quote, M_uint32 flags) M_MALLOC_ALIASED
const char * M_csv_get_header(const M_csv_t *csv, size_t col)
const char * M_csv_get_cell(const M_csv_t *csv, size_t row, const char *colname)
void M_csv_output_set_control_chars(M_csv_t *csv, char delim, char quote)
size_t M_csv_raw_num_cols(const M_csv_t *csv)
M_bool(* M_csv_row_filter_cb)(const M_csv_t *csv, size_t row, void *thunk)
Definition: m_csv.h:93
void M_csv_destroy(M_csv_t *csv) M_FREE(1)
size_t M_csv_raw_num_rows(const M_csv_t *csv)
M_csv_t * M_csv_parse(const char *data, size_t len, char delim, char quote, M_uint32 flags) M_MALLOC
void M_csv_output_rows_buf(M_buf_t *buf, const M_csv_t *csv, M_list_str_t *headers, M_csv_row_filter_cb filter_cb, void *filter_thunk, M_csv_cell_writer_cb writer_cb, void *writer_thunk)
size_t M_csv_get_numcols(const M_csv_t *csv)
const char * M_csv_get_cellbynum(const M_csv_t *csv, size_t row, size_t col)
const char * M_csv_raw_cell(const M_csv_t *csv, size_t row, size_t col)
void M_csv_output_headers_buf(M_buf_t *buf, const M_csv_t *csv, M_list_str_t *headers)
M_bool(* M_csv_cell_writer_cb)(M_buf_t *buf, const char *cell, const char *header, void *thunk)
Definition: m_csv.h:104
struct M_csv M_csv_t
Definition: m_csv.h:78
M_CSV_FLAGS
Definition: m_csv.h:81
ssize_t M_csv_get_cell_num(const M_csv_t *csv, const char *colname)
size_t M_csv_get_numrows(const M_csv_t *csv)
@ M_CSV_FLAG_NONE
Definition: m_csv.h:82
@ M_CSV_FLAG_TRIM_WHITESPACE
Definition: m_csv.h:83
struct M_list_str M_list_str_t
Definition: m_list_str.h:80