Because an unknown reason, I had an Assertion error when using isdigit() on character -96 ' ', so I should recommend using:
if (line[0] >= '0' && line[0] <= '9')
instead of isdigit()
Here is the function used (the line[] has tabulators):
double string_to_double2(char *line, int num)
{
int i1 = 0, max = (int) strlen(line);
for (int i = 0; i < max; i++)
{
if (line[0] >= '0' && line[0] <= '9')
{
if (i1 == num) return strtod(line,&line);
strtod(line, &line);i1++;
}
else line++;
}
return -99999999;
}