Print this page
11586 NAME field in man pages should match what's installed
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/ctype.3c.man.txt
+++ new/usr/src/man/man3c/ctype.3c.man.txt
1 1 CTYPE(3C) Standard C Library Functions CTYPE(3C)
2 2
3 3
4 4
5 5 NAME
6 6 ctype, isalpha, isalnum, isascii, isblank, iscntrl, isdigit, islower,
7 7 isprint, isspace, isupper, ispunct, isgraph, isxdigit, isalpha_l,
8 8 isalnum_l, isblank_l, iscntrl_l, isdigit_l, islower_l, isprint_l,
9 - isspace_l, isupper_l, ispunct_l, isgraph_l isxdigit_l - character
9 + isspace_l, isupper_l, ispunct_l, isgraph_l, isxdigit_l - character
10 10 handling
11 11
12 12 SYNOPSIS
13 13 #include <ctype.h>
14 14
15 15 int isalpha(int c);
16 16
17 17 int isalnum(int c);
18 18
19 19 int isascii(int c);
20 20
21 21 int isblank(int c);
22 22
23 23 int iscntrl(int c);
24 24
25 25 int isdigit(int c);
26 26
27 27 int isgraph(int c);
28 28
29 29 int islower(int c);
30 30
31 31 int isprint(int c);
32 32
33 33 int ispunct(int c);
34 34
35 35 int isspace(int c);
36 36
37 37 int isupper(int c);
38 38
39 39 int isxdigit(int c);
40 40
41 41 int isalpha_l(int c, locale_t loc);
42 42
43 43 int isalnum_l(int c, locale_t loc);
44 44
45 45 int isblank_l(int c, locale_t loc);
46 46
47 47 int iscntrl_l(int c, locale_t loc);
48 48
49 49 int isdigit_l(int c, locale_t loc);
50 50
51 51 int isgraph_l(int c, locale_t loc);
52 52
53 53 int islower_l(int c, locale_t loc);
54 54
55 55 int isprint_l(int c, locale_t loc);
56 56
57 57 int ispunct_l(int c, locale_t loc);
58 58
59 59 int isspace_l(int c, locale_t loc);
60 60
61 61 int isupper_l(int c, locale_t loc);
62 62
63 63 int isxdigit_l(int c, locale_t loc);
64 64
65 65 DESCRIPTION
66 66 These functions classify character-coded integer values. Each is a
67 67 predicate returning non-zero for true, 0 for false. The behavior of
68 68 these macros, except isascii(), is affected by the current locale (see
69 69 setlocale(3C) and uselocale(3C)). To modify the behavior, change the
70 70 LC_TYPE category in setlocale(), that is, setlocale(LC_CTYPE,
71 71 newlocale). In the "C" locale, or in a locale where character type
72 72 information is not defined, characters are classified according to the
73 73 rules of the US-ASCII 7-bit coded character set.
74 74
75 75 The functions isalnum_l(), isalpha_l(), isblank_l(), iscntrl_l,
76 76 isdigit_l(), isgraph_l(), islower_l(), isprint_l(), ispunct_l(),
77 77 isspace_l(), isupper_l(), and isxdigit_l() all behave identically to
78 78 their counterparts without the '_l' prefix, except that instead of
79 79 acting on the current locale, they perform the test on the locale
80 80 specified in the argument loc.
81 81
82 82 The isascii() macro is defined on all integer values. The rest are
83 83 defined only where the argument is an int, the value of which is
84 84 representable as an unsigned char, or EOF, which is defined by the
85 85 <stdio.h> header and represents end-of-file.
86 86
87 87 isalpha()
88 88 Tests for any character for which isupper() or islower()
89 89 is true, or any character that is one of the current
90 90 locale-defined set of characters for which none of
91 91 iscntrl(), isdigit(), ispunct(), or isspace() is true. In
92 92 "C" locale, isalpha() returns true only for the characters
93 93 for which isupper() or islower() is true.
94 94
95 95
96 96 isalnum()
97 97 Tests for any character for which isalpha() or isdigit()
98 98 is true (letter or digit).
99 99
100 100
101 101 isascii()
102 102 Tests for any ASCII character, code between 0 and 0177
103 103 inclusive.
104 104
105 105
106 106 isblank()
107 107 Tests whether c is a character of class blank in the
108 108 current locale. This macro/function is not available to
109 109 applications conforming to standards prior to SUSv3. See
110 110 standards(5)
111 111
112 112
113 113 iscntrl()
114 114 Tests for any ``control character'' as defined by the
115 115 character set.
116 116
117 117
118 118 isdigit()
119 119 Tests for any decimal-digit character.
120 120
121 121
122 122 isgraph()
123 123 Tests for any character for which isalnum() and ispunct()
124 124 are true, or any character in the current locale-defined
125 125 "graph" class which is neither a space ("") nor a
126 126 character for which iscntrl() is true.
127 127
128 128
129 129 islower()
130 130 Tests for any character that is a lower-case letter or is
131 131 one of the current locale-defined set of characters for
132 132 which none of iscntrl(), isdigit(), ispunct(), isspace(),
133 133 or isupper() is true. In the "C" locale, islower()
134 134 returns true only for the characters defined as lower-case
135 135 ASCII characters.
136 136
137 137
138 138 isprint()
139 139 Tests for any character for which iscntrl() is false, and
140 140 isalnum(), isgraph(), ispunct(), the space character (""),
141 141 and the characters in the current locale-defined "print"
142 142 class are true.
143 143
144 144
145 145 ispunct()
146 146 Tests for any printing character which is neither a space
147 147 ("") nor a character for which isalnum() or iscntrl() is
148 148 true.
149 149
150 150
151 151 isspace()
152 152 Tests for any space, tab, carriage-return, newline,
153 153 vertical-tab or form-feed (standard white-space
154 154 characters) or for one of the current locale-defined set
155 155 of characters for which isalnum() is false. In the "C"
156 156 locale, isspace() returns true only for the standard
157 157 white-space characters.
158 158
159 159
160 160 isupper()
161 161 Tests for any character that is an upper-case letter or is
162 162 one of the current locale-defined set of characters for
163 163 which none of iscntrl(), isdigit(), ispunct(), isspace(),
164 164 or islower() is true. In the "C" locale, isupper()
165 165 returns true only for the characters defined as upper-case
166 166 ASCII characters.
167 167
168 168
169 169 isxdigit()
170 170 Tests for any hexadecimal-digit character ([0-9], [A-F],
171 171 or [a-f] or the current locale-defined sets of characters
172 172 representing the hexadecimal digits 10 to 15 inclusive).
173 173 In the "C" locale, only
174 174
175 175 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
176 176
177 177 are included.
178 178
179 179
180 180 RETURN VALUES
181 181 If the argument to any of the character handling macros is not in the
182 182 domain of the function, the result is undefined. Otherwise, the macro
183 183 or function returns non-zero if the classification is TRUE and 0 if the
184 184 classification is FALSE.
185 185
186 186 ATTRIBUTES
187 187 See attributes(5) for descriptions of the following attributes:
188 188
189 189 +--------------------+-----------------+
190 190 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
191 191 +--------------------+-----------------+
192 192 |CSI | Enabled |
193 193 +--------------------+-----------------+
194 194 |Interface Stability | Standard |
↓ open down ↓ |
175 lines elided |
↑ open up ↑ |
195 195 +--------------------+-----------------+
196 196 |MT-Level | MT-Safe |
197 197 +--------------------+-----------------+
198 198
199 199 SEE ALSO
200 200 newlocale(3C), setlocale(3C), uselocale(3C), stdio(3C), ascii(5),
201 201 environ(5), standards(5)
202 202
203 203
204 204
205 - March 14, 2016 CTYPE(3C)
205 + August 20, 2019 CTYPE(3C)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX