Documentation Archive Developer
Search
ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



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 correspond-ing corresponding
     ing integer value.  The character can be any decimal digit or hexadecimal
     digit.  With hexadecimal characters, the case of the values does not mat-ter. matter.
     ter.

     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