466
|
1 <refentry id="isalpha">
|
|
2 <refnamediv>
|
570
|
3 <refname>Isalpha</refname>
|
|
4 <refname>Isupper</refname>
|
|
5 <refname>Islower</refname>
|
|
6 <refname>Isdigit</refname>
|
|
7 <refname>Isalnum</refname>
|
|
8 <refname>Isspace</refname>
|
|
9 <refname>Ispunct</refname>
|
|
10 <refname>Isprint</refname>
|
|
11 <refname>Iscntrl</refname>
|
|
12 <refname>Isascii</refname>
|
|
13 <refpurpose>character classification</refpurpose>
|
466
|
14 </refnamediv>
|
|
15
|
|
16 <refsynopsisdiv>
|
|
17 <funcsynopsis>
|
468
|
18 <funcsynopsisinfo>
|
|
19 #include <ctype.h>
|
|
20 </funcsynopsisinfo>
|
570
|
21
|
466
|
22 <funcprototype>
|
|
23 <funcdef><function>isalpha</function></funcdef>
|
570
|
24 <paramdef>int <parameter>c</parameter></paramdef>
|
466
|
25 </funcprototype>
|
|
26 </funcsynopsis>
|
|
27
|
|
28 </refsynopsisdiv>
|
|
29
|
|
30 <refsect1><title>Description</title>
|
|
31 <para>
|
601
|
32 These functions use table look-up to classify characters
|
|
33 according to their ascii value. The header file defines them
|
|
34 as macros which means that they are implemented as fast, inline
|
|
35 code rather than subroutines.
|
|
36 </para>
|
|
37 <para>
|
|
38 Each results in non-zero for true or zero for false.
|
|
39 </para>
|
|
40 <para>
|
|
41 The correct value is guaranteed for all integer values in
|
|
42 isascii, but the result is unpredictable in the others if the
|
|
43 argument is outside the range -1 to 127.
|
|
44 </para>
|
|
45 <para>
|
|
46 The truth tested by each function is a follows:
|
466
|
47 </para>
|
601
|
48 <informaltable frame="none">
|
|
49 <tgroup cols="2">
|
636
|
50 <colspec colwidth="1in"/>
|
|
51 <colspec colwidth="3in"/>
|
601
|
52 <tbody>
|
|
53 <row>
|
|
54 <entry>isalpha</entry>
|
|
55 <entry>c is a letter</entry>
|
|
56 </row>
|
|
57 <row>
|
|
58 <entry>isdigit</entry>
|
|
59 <entry>c is a digit</entry>
|
|
60 </row>
|
|
61 <row>
|
|
62 <entry>isupper</entry>
|
|
63 <entry>c is an upper case letter</entry>
|
|
64 </row>
|
|
65 <row>
|
|
66 <entry>islower</entry>
|
|
67 <entry>c is a lower case letter</entry>
|
|
68 </row>
|
|
69 <row>
|
|
70 <entry>isalnum</entry>
|
|
71 <entry>c is a letter or a digit</entry>
|
|
72 </row>
|
|
73 <row>
|
|
74 <entry>isspace</entry>
|
|
75 <entry>c is a space, tab character, newline, carriage return or formfeed</entry>
|
|
76 </row>
|
|
77 <row>
|
|
78 <entry>iscntrl</entry>
|
|
79 <entry>c is a control character (0 to 32) or DEL (127)</entry>
|
|
80 </row>
|
|
81 <row>
|
|
82 <entry>ispunct</entry>
|
|
83 <entry>c is neither countrol nor alpha-numeric</entry>
|
|
84 </row>
|
|
85 <row>
|
|
86 <entry>isprint</entry>
|
|
87 <entry>c is printable (32 to 126)</entry>
|
|
88 </row>
|
|
89 <row>
|
|
90 <entry>isascii</entry>
|
|
91 <entry>c is in the range -1 to 127</entry>
|
|
92 </row>
|
|
93 </tbody>
|
|
94 </tgroup>
|
|
95 </informaltable>
|
|
96
|
466
|
97 </refsect1>
|
|
98 </refentry>
|