HeadingsCSV

CSV parser with special handling of column headings. Passes extracted fields, one row at a time to a user-provided delegate, along with the column heading of each field.

Constructors

this
this()

Constructor.

Members

Aliases

RowDg
alias RowDg = bool delegate(Field[] fields)

Type of delegate which receives parsed CSV rows.

Functions

parse
void parse(InputStream stream, cstring[] include_headings, RowDg row_dg)

Parses CSV data from the provided stream. Parsing ends when an EOF is encountered. As rows are extracted and parsed, they are passed to the provided delegate.

parse
void parse(InputStream stream, RowDg row_dg)

Parses CSV data from the provided stream. Parsing ends when an EOF is encountered. As rows are extracted and parsed, they are passed to the provided delegate.

Structs

Field
struct Field

Struct containing the name and value of a field. Field names are sliced from the 'headings' array (see below). A list of Field structs is passed to the user's delegate which is passed to the parse method.

Meta