1ISDIGIT(3P)                POSIX Programmer's Manual               ISDIGIT(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       isdigit, isdigit_l — test for a decimal digit
14

SYNOPSIS

16       #include <ctype.h>
17
18       int isdigit(int c);
19       int isdigit_l(int c, locale_t locale);
20

DESCRIPTION

22       For isdigit(): The functionality described on this  reference  page  is
23       aligned  with the ISO C standard. Any conflict between the requirements
24       described here and the ISO C standard is unintentional. This volume  of
25       POSIX.1‐2008 defers to the ISO C standard.
26
27       The isdigit() and isdigit_l() functions shall test whether c is a char‐
28       acter of class digit in the current locale, or  in  the  locale  repre‐
29       sented  by  locale,  respectively;  see  the Base Definitions volume of
30       POSIX.1‐2008, Chapter 7, Locale.
31
32       The c argument is an int, the value  of  which  the  application  shall
33       ensure is a character representable as an unsigned char or equal to the
34       value of the macro EOF. If the argument has any other value, the behav‐
35       ior is undefined.
36
37       The  behavior is undefined if the locale argument to isdigit_l() is the
38       special locale object LC_GLOBAL_LOCALE or is not a valid locale  object
39       handle.
40

RETURN VALUE

42       The isdigit() and isdigit_l() functions shall return non-zero if c is a
43       decimal digit; otherwise, they shall return 0.
44

ERRORS

46       No errors are defined.
47
48       The following sections are informative.
49

EXAMPLES

51       None.
52

APPLICATION USAGE

54       To ensure applications  portability,  especially  across  natural  lan‐
55       guages,  only  these functions and the functions in the reference pages
56       listed in the SEE ALSO section should be used for character classifica‐
57       tion.
58

RATIONALE

60       None.
61

FUTURE DIRECTIONS

63       None.
64

SEE ALSO

66       isalnum(),   isalpha(),  isblank(),  iscntrl(),  isgraph(),  islower(),
67       isprint(), ispunct(), isspace(), isupper(), isxdigit()
68
69       The  Base  Definitions  volume  of  POSIX.1‐2008,  Chapter  7,  Locale,
70       <ctype.h>, <locale.h>
71
73       Portions  of  this text are reprinted and reproduced in electronic form
74       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
75       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
76       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
77       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
78       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
79       event of any discrepancy between this version and the original IEEE and
80       The Open Group Standard, the original IEEE and The Open Group  Standard
81       is  the  referee document. The original Standard can be obtained online
82       at http://www.unix.org/online.html .
83
84       Any typographical or formatting errors that appear  in  this  page  are
85       most likely to have been introduced during the conversion of the source
86       files to man page format. To report such errors,  see  https://www.ker
87       nel.org/doc/man-pages/reporting_bugs.html .
88
89
90
91IEEE/The Open Group                  2013                          ISDIGIT(3P)
Impressum