manpages.info - online man pages   

Mac OS X / Darwin man pages : digittoint (3)
digittoint (3)

Table of Contents

Name

digittoint - convert a numeric character to its integer value

Library

Standard C Library (libc, -lc)

Synopsis

#include <ctype.h>

int
digittoint(int c);

Description

The digittoint() function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexadecimal digit. With hexadecimal characters, the case of the values does not matter.

Return Values

The digittoint() function always returns an integer from the range of 0 to 15. If the given character was not a digit as defined by isxdigit(3) , the function will return 0.

See Also

isalnum(3) , isalpha(3) , isascii(3) , iscntrl(3) , isdigit(3) , isgraph(3) , islower(3) , isprint(3) , ispunct(3) , isspace(3) , isupper(3) , isxdigit(3) , stdio(3) , tolower(3) , toupper(3) , ascii(7)


Table of Contents