Skip to content

scan_int.3

Manvendra Bhangui edited this page Feb 25, 2024 · 5 revisions

NAME

scan_int - parse an integer in decimal ASCII representation

SYNTAX

#include <scan.h>

unsigned int scan_int(const char *src,int *dest);

DESCRIPTION

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.

SEE ALSO

scan_long(3), scan_xint(3) scan_8int(3) fmt_int(3),

Clone this wiki locally