csvparser 1.0.7
csvparser: ^1.0.7 copied to clipboard
a simple csvparser.
csvparser #
Naive csvparser. This code may work, or it may not. I just got bored by writing it repeatedly, so I thought I'd publish it.
Sample usage: #
String data=""hello","world"\n"wie\ngeht's","dir"";
CsvParser cp = new CsvParser(data, seperator:",", quotemark:"""); while(cp.moveNext()) { while(cp.current.moveNext()) print(cp.current.current); }
Improvements: #
- introduction of setHeaders(List
- introduction of toList() and toMap(List
- introduction of getLineAsList() and getLineAsMap({List
- introduction of setHeaders:false option to CsvParser. This will attempt to set the headers to the first line in the file
- added CsvFieldType enum class