FMTSTRTOD(3)FMTSTRTOD(3)

NAME
fmtstrtod, fmtcharstod - convert text to numbers

SYNOPSIS
#include <utf.h>
#include <fmt.h>
double       fmtstrtod(char *nptr, char **rptr)
double       fmtcharstod(int (*f)(void *), void *a)

DESCRIPTION
Fmtstrtod converts a string pointed to by nptr to floating point representation and, if rptr is not zero, sets *rptr to point to the input character immediately after the string converted. Fmtstrtod recognizes an optional string of tabs and spaces, then an optional sign, then a string of digits optionally containing a decimal point, then an optional e or E followed by an optionally signed integer.
Fmtcharstod interprets floating point numbers in the manner of atof, but gets successive characters by calling (*f)(a). The last call to f terminates the scan, so it must have returned a character that is not a legal continuation of a number. Therefore, it may be necessary to back up the input stream one character after calling fmtcharstod.

SOURCE
https://9fans.github.io/plan9port/unix

SEE ALSO
fscanf(3)

DIAGNOSTICS
Zero is returned if the beginning of the input string is not interpretable as a number; even in this case, rptr will be updated.