4 ms·
I wrote my own CSV code rarher thsn using a library because the input CSVs were produced by guys who didn't use a library. The columns had a fixed "real width"
by mmm_grayons 6y ago
I wrote my own CSV code rarher thsn using a library because the input CSVs were produced by guys who didn't use a library. The columns had a fixed "real width" but also had a column that contained an indeterminate number of comma-separated, values. One can escape commas in CSV for just such a purpose, but these guys didn't. So, to deal with this issue quickly, I had to basically parse the line forwards until I hit the variable-length field, then backwards until I hit it as well. Then I could parse the field to determine how many values it had and extract them.