Are there any CSV parsers floating around on this forum?
I wrote one a long time ago, but it kind of sucked.
You can't search the forum for "CSV". Searching for "parser", I didn't see anything.
You can't search the forum for "CSV". Searching for "parser", I didn't see anything.
0
Comments
define_function integer ParseCSV(char cCSVString[], char cParameters[][]) { stack_var integer nNumParameters // number of parameters found in cCSVString nNumParameters = 0 while (length_array(cCSVString)) { nNumParameters++ cParameters[nParameters] = DuetParseCmdParam(cCSVString) } set_length_array(cParameters, nNumParameters) return nNumParameters }The total number of variables in the CSV line is returned from the function, and the individual variables are returned in whatever variable was passed as cParameters.Andy
I found some java article about CSV and converted it to netlinx. It's a mess. Seems to mostly work. I've lost interest.