I have a CSV string and I want to split it into an array. However, CSV is a combination of strings and numbers, where strings are enclosed in quotation marks and may contain commas.
For example, I can have CSV as follows:
1,"Hello",2,"World",3,"Hello, World"
I would like the string to be split into:
1 "Hello" 2 "World" 3 "Hello, World"
If I use String.Split(','); , I get:
1 "Hello" 2 "World" 3 "Hello World"
Is there an easy way to do this? A library that is already written, or do I need to parse a string character with a character?
source share