OSDN Git Service

(split) [JM:00125] Fix a translation mistake in isupper(3).
[linuxjm/LDP_man-pages.git] / draft / man3 / isalpha.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\"
24 .\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu)
25 .\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu)
26 .\" Modified Sat Sep  2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
27 .\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de)
28 .\"
29 .\" Japanese Version Copyright (c) 1997 Ueyama Rui
30 .\"         all rights reserved.
31 .\" Translated 1997-08-29, Ueyama Rui <rui@campus.or.jp>
32 .\" Updated 1999-07-16, Kentaro Shirakata <argrath@yo.rim.or.jp>
33 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
34 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
35 .\"
36 .TH ISALPHA 3 2010-09-20 "GNU" "Linux Programmer's Manual"
37 .\"O .SH NAME
38 .SH Ì¾Á°
39 .\"O isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
40 .\"O isprint, ispunct, isspace, isupper, isxdigit \- character
41 .\"O classification routines
42 isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
43 isprint, ispunct, isspace, isupper, isxdigit \- Ê¸»ú¤òʬÎह¤ë
44 .\"O .SH SYNOPSIS
45 .SH ½ñ¼°
46 .nf
47 .B #include <ctype.h>
48 .sp
49 .BI "int isalnum(int " "c" );
50 .br
51 .BI "int isalpha(int " "c" );
52 .br
53 .BI "int isascii(int " "c" );
54 .br
55 .BI "int isblank(int " "c" );
56 .br
57 .BI "int iscntrl(int " "c" );
58 .br
59 .BI "int isdigit(int " "c" );
60 .br
61 .BI "int isgraph(int " "c" );
62 .br
63 .BI "int islower(int " "c" );
64 .br
65 .BI "int isprint(int " "c" );
66 .br
67 .BI "int ispunct(int " "c" );
68 .br
69 .BI "int isspace(int " "c" );
70 .br
71 .BI "int isupper(int " "c" );
72 .br
73 .BI "int isxdigit(int " "c" );
74 .fi
75 .sp
76 .in -4n
77 .\"O Feature Test Macro Requirements for glibc (see
78 .\"O .BR feature_test_macros (7)):
79 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
80 .RB ( feature_test_macros (7)
81 »²¾È):
82 .in
83 .sp
84 .ad l
85 .BR isascii ():
86 .RS 4
87 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
88 .br
89 .RE
90 .BR isblank ():
91 .RS 4
92 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
93 _POSIX_C_SOURCE\ >=\ 200112L;
94 .br
95 or
96 .I cc\ -std=c99
97 .RE
98 .ad
99 .\"O .SH DESCRIPTION
100 .SH ÀâÌÀ
101 .\"O These functions check whether
102 .\"O .IR c ,
103 .\"O which must have the value of an
104 .\"O .I unsigned char
105 .\"O or
106 .\"O .BR EOF ,
107 .\"O falls into a certain character class according to the current locale.
108 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¸½ºß¤Î¥í¥±¡¼¥ë¤Ë½¾¤Ã¤Æ
109 .I c
110 ¤òʬÎह¤ë¡£
111 .I c
112 ¤Ï
113 .I unsigned char
114 ¤«
115 .B EOF
116 ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
117 .TP
118 .BR isalnum ()
119 .\"O checks for an alphanumeric character; it is equivalent to
120 .\"O .BI "(isalpha(" c ") || isdigit(" c "))" \fR.
121 ±Ñ»ú¤Þ¤¿¤Ï¿ô»ú¤Ç¤¢¤ë¤«¤òÄ´¤Ù¤ë¡£
122 .BI "(isalpha(" c ") || isdigit(" c "))" \fR
123 ¤ÈÅù²Á¤Ç¤¢¤ë¡£
124 .TP
125 .BR isalpha ()
126 .\"O checks for an alphabetic character; in the standard \fB"C"\fP
127 .\"O locale, it is equivalent to
128 .\"O .BI "(isupper(" c ") || islower(" c "))" \fR.
129 .\"O In some locales, there may be additional characters for which
130 .\"O .BR isalpha ()
131 .\"O is true\-\-letters which are neither upper case nor lower
132 .\"O case.
133 ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¤«¤É¤¦¤«Ä´¤Ù¤ë¡£É¸½à¤Î \fB"C"\fP ¥í¥±¡¼¥ë¤Ç¤Ï
134 .BI "(isupper(" c ") || islower(" c "))" \fR
135 ¤ÈÅù²Á¤Ç¤¢¤ë¡£Â¾¤Î¥í¥±¡¼¥ë¤Ç¤Ï¡¢Âçʸ»ú¤Ç¤â¾®Ê¸»ú¤Ç¤â¤Ê¤¤Â¾¤Îʸ»ú¤Ç¤â
136 .BR isalpha ()
137 ¤¬ true ¤òÊÖ¤¹¤³¤È¤¬¤¢¤ë¡£
138 .TP
139 .BR isascii ()
140 .\"O checks whether \fIc\fP is a 7-bit
141 .\"O .I unsigned char
142 .\"O value that fits into
143 .\"O the ASCII character set.
144 \fIc\fP ¤¬¡¢ASCIIʸ»ú¥»¥Ã¥È¤Ë¹çÃפ¹¤ë 7¥Ó¥Ã¥È¤Î
145 .I unsigned char
146 ¤Ç¤¢¤ë¤«¤òÄ´¤Ù¤ë¡£
147 .TP
148 .BR isblank ()
149 .\"O checks for a blank character; that is, a space or a tab.
150 ¶õÇòʸ»ú (¥¹¥Ú¡¼¥¹¤«¥¿¥Ö) ¤Ç¤¢¤ë¤«¤òÄ´¤Ù¤ë¡£
151 .TP
152 .BR iscntrl ()
153 .\"O checks for a control character.
154 À©¸æʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
155 .TP
156 .BR isdigit ()
157 .\"O checks for a digit (0 through 9).
158 ¿ô»ú (0¡Á9) ¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
159 .TP
160 .BR isgraph ()
161 .\"O checks for any printable character except space.
162 ɽ¼¨²Äǽ¤Êʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¥¹¥Ú¡¼¥¹¤Ï´Þ¤Þ¤ì¤Ê¤¤¡£
163 .TP
164 .BR islower ()
165 .\"O checks for a lower-case character.
166 ¾®Ê¸»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
167 .TP
168 .BR isprint ()
169 .\"O checks for any printable character including space.
170 ɽ¼¨²Äǽ¤Êʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¥¹¥Ú¡¼¥¹¤â´Þ¤Þ¤ì¤ë¡£
171 .TP
172 .BR ispunct ()
173 .\"O checks for any printable character which is not a space or an
174 .\"O alphanumeric character.
175 ɽ¼¨²Äǽ¤Êʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¥¹¥Ú¡¼¥¹¤È±Ñ¿ô»ú¤Ï´Þ¤Þ¤ì¤Ê¤¤¡£
176 .TP
177 .BR isspace ()
178 .\"O checks for white-space characters.
179 .\"O In the
180 .\"O .B """C"""
181 .\"O and
182 .\"O .B """POSIX"""
183 .\"O locales, these are: space, form-feed
184 .\"O .RB ( \(aq\ef\(aq ),
185 .\"O newline
186 .\"O .RB ( \(aq\en\(aq ),
187 .\"O carriage return
188 .\"O .RB ( \(aq\er\(aq ),
189 .\"O horizontal tab
190 .\"O .RB ( \(aq\et\(aq ),
191 .\"O and vertical tab
192 .\"O .RB ( \(aq\ev\(aq ).
193 .\"O .TP
194 .\"O .BR isupper ()
195 .\"O checks for an uppercase letter.
196 ¶õÇòʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
197 .B """C"""
198 ¥í¥±¡¼¥ë¤«
199 .B """POSIX"""
200 ¥í¥±¡¼¥ë¤Ç¤Ï¡¢¶õÇòʸ»ú¤È¤Ï¡¢¥¹¥Ú¡¼¥¹¡¢¥Õ¥©¡¼¥à¥Õ¥£¡¼¥É
201 .RB ( \(aq\ef\(aq )
202 ¡¢²þ¹Ô(newline)
203 .RB ( \(aq\en\(aq )
204 ¡¢Éüµ¢(carriage return)
205 .RB ( \(aq\er\(aq )
206 ¡¢¿åÊ¿¥¿¥Ö
207 .RB ( \(aq\et\(aq )
208 ¡¢¿âľ¥¿¥Ö
209 .RB ( \(aq\ev\(aq )
210 ¤Ç¤¢¤ë¡£
211 .TP
212 .BR isupper ()
213 .\"O checks for an uppercase letter.
214 Âçʸ»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
215 .TP
216 .BR isxdigit ()
217 .\"O checks for a hexadecimal digits, that is, one of
218 .\"O .br
219 .\"O .BR "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" .
220 16¿Ê¿ô¤Ç¤Î¿ô»ú¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
221 .br
222 .B "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F"
223 ¤Îʸ»ú¤Ç¤¢¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¤³¤È¤ÈÅù²Á¤Ç¤¢¤ë¡£
224 .\"O .SH "RETURN VALUE"
225 .SH ÊÖ¤êÃÍ
226 .\"O The values returned are nonzero if the character
227 .\"O .I c
228 .\"O falls into the tested class, and a zero value
229 .\"O if not.
230 ʸ»ú
231 .I c
232 ¤¬Ä´¤Ù¤¿Ê¸»ú¤Î¼ïÎà¤Ë¹ç¤Ã¤Æ¤¤¤ì¤Ð 0 °Ê³°¤òÊÖ¤¹¡£
233 ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£
234 .\"O .SH "CONFORMING TO"
235 .SH ½àµò
236 .\"O C99, 4.3BSD.
237 .\"O C89 specifies all of these functions except
238 .\"O .BR isascii ()
239 .\"O and
240 .\"O .BR isblank ().
241 .\"O .BR isascii ()
242 .\"O is a BSD extension
243 .\"O and is also an SVr4 extension.
244 .\"O .BR isblank ()
245 .\"O conforms to POSIX.1-2001 and C99 7.4.1.3.
246 C99, 4.3BSD.
247 C89 ¤Ç¤Ï¡¢¤³¤ì¤é¤Î´Ø¿ô¤Î¤¦¤Á
248 .BR isascii ()
249 ¤È
250 .BR isblank ()
251 °Ê³°¤Î
252 ¤¹¤Ù¤Æ¤¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
253 .BR isascii ()
254 ¤Ï BSD ¤ä SVr4 ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
255 .BR isblank ()
256 ¤Ï POSIX.1-2001 ¤È C99 7.4.1.3 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
257 .\"O POSIX.1-2008 marks
258 .\"O .BR isascii ()
259 .\"O as obsolete,
260 .\"O noting that it cannot be used portably in a localized application.
261 POSIX.1-2008 ¤Ï¡¢
262 .BR isascii ()
263 ¤òÇÑ»ßͽÄê¤È¤·¤Æ¤¤¤ë¡£
264 ¥í¡¼¥«¥é¥¤¥º¤µ¤ì¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢°Ü¿¢À­¤ò³ÎÊݤ·¤Ä¤Ä¡¢
265 ¤³¤Î´Ø¿ô¤ò»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
266 .\"O .SH NOTES
267 .SH Ãí°Õ
268 .\"O The details of what characters belong into which class depend on the current
269 .\"O locale.
270 .\"O For example,
271 .\"O .BR isupper ()
272 .\"O will not recognize an A-umlaut (\(:A) as an uppercase letter in the default
273 .\"O .B "C"
274 .\"O locale.
275 ¤¢¤ëʸ»ú¤¬¤É¤Î¼ïÎà¤ËÆþ¤ë¤«¤È¤¤¤¦¤³¤È¤Ï¡¢¸½ºß¤Î¥í¥±¡¼¥ë¤Ë°Í¸¤¹¤ë¡£
276 ¤¿¤È¤¨¤Ð¡¢¥Ç¥Õ¥©¥ë¥È¤Î
277 .B "C"
278 ¥í¥±¡¼¥ë¤Ç¤Ï
279 .BR isupper ()
280 ¤Ï A ¤Î¥¦¥à¥é¥¦¥È¤òǧ¼±¤Ç¤­¤Ê¤¤¤Î¤Ç¡¢¤½¤ì¤¬Âçʸ»ú¤À¤È¤¤¤¦¤³¤È¤¬¤ï¤«¤é¤Ê¤¤¡£
281 .\"O .SH "SEE ALSO"
282 .SH ´ØÏ¢¹àÌÜ
283 .BR iswalnum (3),
284 .BR iswalpha (3),
285 .BR iswblank (3),
286 .BR iswcntrl (3),
287 .BR iswdigit (3),
288 .BR iswgraph (3),
289 .BR iswlower (3),
290 .BR iswprint (3),
291 .BR iswpunct (3),
292 .BR iswspace (3),
293 .BR iswupper (3),
294 .BR iswxdigit (3),
295 .BR setlocale (3),
296 .BR toascii (3),
297 .BR tolower (3),
298 .BR toupper (3),
299 .BR ascii (7),
300 .BR locale (7)