-
-
Notifications
You must be signed in to change notification settings - Fork 3
scan_int.3
Manvendra Bhangui edited this page Feb 25, 2024
·
5 revisions
scan_int - parse an integer in decimal ASCII representation
#include <scan.h>
unsigned int scan_int(const char *src,int *dest);
scan_int parses an integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes successfully read from src.
src may begin with an arbitrary amount of white space characters (white space or tabs), followed by a single optional '+' or '-' sign. White space characters following the '+' or '-' sign are also ignored. Remainder of the string is converted to a int value in the obvious manner, stopping at the first character which is not a valid digit.
scan_long(3), scan_xint(3) scan_8int(3) fmt_int(3),