OSDN Git Service

bf1f6b6e34ae7edc4fa76c4e4c005597aa98f79a
[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)