NEW TICKET#22 · Client import
Read a CSV line with quoted commas
Tomás Reyes · Support Lead
Opened today
“People import their clients from a spreadsheet saved as CSV, and any client with a comma in their name breaks: "Smith, Jones & Co" turns into two columns and everything after it shifts one place. Spreadsheets put a field like that in double quotes, and write a quote inside it as two quotes: "The ""Best"" Bakery". Hannah started parseCsvLine, which already splits on commas character by character; it needs to know when it's inside quotes. Can you finish it?”
YOUR PLAN
- 1Watch an example2 min
- 2Warm-up 11 min
- 3Warm-up 21 min
- 4Fix the ticket21 min
BY THE END YOU CAN
- Walk through text one character at a time
- Keep a true/false flag for the state you're in
- Look one character ahead