parseRows method
Parses the specified data
, which must be in the delimiter-separated
values format with the appropriate delimiter, returning an list of lists
representing the parsed rows.
Unlike parse, this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header. Each row is represented as an list rather than an map. Rows may have variable length. For example, consider the following CSV file, which notably lacks a header line:
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38
The resulting Dart list is:
[
["1997", "Ford", "E350", "2.34"],
["2000", "Mercury", "Cougar", "2.38"]
];
There is no automatic conversion to numbers, dates, or other types. To convert the maps during the parse process, use parseWith.
Implementation
List<List<String>> parseRows(String data) => parseRowsWith(data, (r, _) => r);