I have a text file that contains lines of data with format something like this
int,int,int,string,string,int
The problem I have been having with functions like strtok()
and sscanf()
is that each field is not guaranteed to contain data.
A few example lines
12,3,4,example,withoutspace,57
3,,1,,t e s t,892
78,,,example with url,http://www.website.com/asd/asd/asd,2
Basically, I need to replicate String.Split() from C#, which would return an arrray of strings (including empty ones).