Esc

Csv_Reader

structextensionsince 0.36.1Source
  • macOS: Csv_Reader works on macOS
  • Linux: Csv_Reader works on Linux
  • Windows: Csv_Reader works on Windows
  • Wasm: Csv_Reader works on Wasm

Declaration

Csv_Reader :: struct(Row: Type = void) {
    #as using core: Csv_Core;}

A reader over CSV bytes or a chunk source. Create it with csv_reader, advance it with csv_next (or for row: reader) and release it with csv_reader_free. Row is the struct each record is decoded into; the default void reads records as [] string. Once reading stops, reader.error says why (.NONE at the end of the input). The reader's own storage uses the allocator that was current when it was made; a typed row uses the one current at the call.

See also