The strtod function converts string into a floating-point value. The input string is a sequence of characters that can be interpreted as a floating-point number. Whitespace characters at the beginning of string are skipped. The value of *ptr is set to point to the first character in string immediately following the converted part of string. If ptr is NULL, no value is assigned to *ptr. If no conversion is possible, *ptr is set to the value of string and the value 0 is returned by the strtod function. The strtod function requires string to have the following format:
〚{+|-}〛 digits 〚.digits〛 〚{e|E} 〚{+|-}〛 digits〛
Where | digits | May be one or more decimal digits (0-9). |
|