Can anyone advise an easy way to convert a csv string to a float array in C?
eg.
char my_string[] = "1.0,2.0,3.0";
to:
my_array = [1.0, 2.0, 3.0]
where my_array is of type float[]
I would use sscanf as a quick and easy solution, but I do not know how many values ββare contained in the string in advance
Is there any existing library function that could do this without me, to resort to cycling through each char in search of ","?
source share