Version 0.60.0

csv::parse

Parses comma-separated values (CSV) data into an array.

Signatures

  •   string[][] parse( string& csv )
  •   string[][] parse( string& csv, string separator )
  •   string[][] parse( string& csv, string separator, string qualifier )

Details

A string containing CSV data gets parsed and the elements returned in a two-dimensional array.

Return value

A two-dimensional array of strings containing the CSV data.

Parameters

csv

String that contains CSV data.

separator

Separator string that is used in csv. This is typically either a comma (',') or a semicolon (';'). If this parameter is omitted, separation by commas is assumed.

qualifier

Text-qualification mark used in csv. This is typically a double quote ('"'). Single quotes are used in rare cases. If this parameter is omitted, double quotes are assumed.

🗙

Search results for