std1.0.0-beta-7 SafeC docs

std :: serial::csv

Function std::csv_parse

#include <std/serial/csv.h> source · definition

struct Value csv_parse(const &char text, ?&int ok)

Parses a CSV document into a VAL_ARRAY of VAL_ARRAY of VAL_STRING (every field, quoted or not, becomes a string — see the file-level comment). Accepts both "\n" and "\r\n" line endings; a trailing newline is optional. On success, '*ok' (if non-NULL) is set to 1; on a malformed quoted field (an opening '"' with no matching close before end of text), '*ok' is set to 0 and the return value is whatever was parsed so far.