osx man page for digittoint

Query: digittoint

OS: osx

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

DIGITTOINT(3)						   BSD Library Functions Manual 					     DIGITTOINT(3)

NAME
digittoint, digittoint_l -- convert a numeric character to its integer value
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h> int digittoint(int c); #include <xlocale.h> #include <ctype.h> int digittoint_l(int c, locale_t loc);
DESCRIPTION
The digittoint() function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexa- decimal digit. With hexadecimal characters, the case of the values does not matter. While the digittoint() function uses the current locale, the digittoint_l() function may be passed a locale directly. See xlocale(3) for more information.
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
ctype(3), isdigit(3), isxdigit(3), xlocale(3)
BSD
April 6, 2001 BSD
Related Man Pages
toascii(3) - mojave
ctype_l(3) - mojave
digittoint_l(3) - mojave
ctype(3) - osx
digittoint(3) - osx
Similar Topics in the Unix Linux Community
How to convert a 2 digit to 4 digit
check whether it is a non-numeric character
Prefix integer with zeros
compare decimal and integer values in if in bash shell
Awk numeric range match only one digit?