convert part of a string to float or cut first letter off

Hello,

i have a string called line which looks like A123.456 that comes over the serial port to the arduino.
now i have a switch case which uses the line[0] to do differnt things.
Now i need to somehow get the value into a float numer.
how can i do this?
something like this pseudocode:
floatnumber = float(line[1 to End]);
the length of the string is variable

goaran:
floatnumber = float(line[1 to End]);

char line[16];
//[...]
double floatnumber=atof(line+1);

Make sure that the string is terminated before passing it to atof.

string is terminated and everything works fine.
thanks :wink: