|
NAMEfmtstrtod, fmtcharstod - convert text to numbersSYNOPSIS#include <utf.h>#include <fmt.h> double fmtstrtod(char *nptr, char **rptr) double fmtcharstod(int (*f)(void *), void *a) DESCRIPTIONFmtstrtod 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 or 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. SOURCEhttps://9fans.github.io/plan9port/unixSEE ALSOfscanf(3)DIAGNOSTICSZero is returned if the beginning of the input string is not interpretable as a number; even in this case, rptr will be updated. Visit the GSP FreeBSD Man Page Interface. |