"No, honest guys, I knew CSV was more complicated. I just didn't need to make my code safe."
Here's a csv parser in Erlang that actually attempts all that trivial stuff:
https://github.com/rcouch/ecsv/blob/master/src/ecsv_parser.e...
That's a lot more code than yours. And the notes even say it's not tolerant of badly formed CSVs.
Also, I did try to make clear that the given code was created 'for a specific use case in which I knew' that the format of the input files was tightly defined.
"No, honest guys, I knew CSV was more complicated. I just didn't need to make my code safe."
Here's a csv parser in Erlang that actually attempts all that trivial stuff:
https://github.com/rcouch/ecsv/blob/master/src/ecsv_parser.e...
That's a lot more code than yours. And the notes even say it's not tolerant of badly formed CSVs.