OSDN Git Service

548513323e6b2aa8c743fddfd9deeec1d354269f
[linuxjm/LDP_man-pages.git] / release / man3 / isalpha.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu)
26 .\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu)
27 .\" Modified Sat Sep  2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
28 .\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de)
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .\"
36 .\" Japanese Version Copyright (c) 1997 Ueyama Rui
37 .\"         all rights reserved.
38 .\" Translated 1997-08-29, Ueyama Rui <rui@campus.or.jp>
39 .\" Updated 1999-07-16, Kentaro Shirakata <argrath@yo.rim.or.jp>
40 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
41 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
42 .\"
43 .TH ISALPHA 3 2014\-03\-18 GNU "Linux Programmer's Manual"
44 .SH 名前
45 isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
46 isprint, ispunct, isspace, isupper, isxdigit, isalnum_l, isalpha_l,
47 isascii_l, isblank_l, iscntrl_l, isdigit_l, isgraph_l, islower_l, isprint_l,
48 ispunct_l, isspace_l, isupper_l, isxdigit_l \- 文字を分類する
49 .SH 書式
50 .nf
51 \fB#include <ctype.h>\fP
52 .sp
53 \fBint isalnum(int \fP\fIc\fP\fB);\fP
54 \fBint isalpha(int \fP\fIc\fP\fB);\fP
55 \fBint iscntrl(int \fP\fIc\fP\fB);\fP
56 \fBint isdigit(int \fP\fIc\fP\fB);\fP
57 \fBint isgraph(int \fP\fIc\fP\fB);\fP
58 \fBint islower(int \fP\fIc\fP\fB);\fP
59 \fBint isprint(int \fP\fIc\fP\fB);\fP
60 \fBint ispunct(int \fP\fIc\fP\fB);\fP
61 \fBint isspace(int \fP\fIc\fP\fB);\fP
62 \fBint isupper(int \fP\fIc\fP\fB);\fP
63 \fBint isxdigit(int \fP\fIc\fP\fB);\fP
64
65 \fBint isascii(int \fP\fIc\fP\fB);\fP
66 \fBint isblank(int \fP\fIc\fP\fB);\fP
67
68 \fBint isalnum_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
69 \fBint isalpha_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
70 \fBint isblank_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
71 \fBint iscntrl_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
72 \fBint isdigit_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
73 \fBint isgraph_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
74 \fBint islower_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
75 \fBint isprint_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
76 \fBint ispunct_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
77 \fBint isspace_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
78 \fBint isupper_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
79 \fBint isxdigit_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
80
81 \fBint isascii_l(int \fP\fIc\fP\fB, locale_t \fP\fIlocale\fP\fB);\fP
82 .fi
83 .sp
84 .in -4n
85 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
86 .in
87 .sp
88 .ad l
89 \fBisascii\fP():
90 .RS 4
91 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
92 .br
93 .RE
94
95 \fBisblank\fP():
96 .RS 4
97 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
98 .br
99 または \fIcc\ \-std=c99\fP
100 .RE
101
102 \fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(), \fBiscntrl_l\fP(),
103 \fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(), \fBisprint_l\fP(),
104 \fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(), \fBisxdigit_l\fP():
105 .PD 0
106 .RS 4
107 .TP 
108 glibc 2.10 以降:
109 _XOPEN_SOURCE\ >=\ 700
110 .TP 
111 glibc 2.10 より前:
112 _GNU_SOURCE
113 .RE
114 .PD
115
116 \fBisascii_l\fP():
117 .PD 0
118 .RS 4
119 .TP 
120 glibc 2.10 以降:
121 _XOPEN_SOURCE\ >=\ 700 && (_SVID_SOURCE || _BSD_SOURCE)
122 .TP 
123 glibc 2.10 より前:
124 _GNU_SOURCE
125 .RE
126 .PD
127 .ad
128 .SH 説明
129 これらの関数は、指定したロケールに従って \fIc\fP を分類する。 \fIc\fP は \fIunsigned char\fP か \fBEOF\fP でなければならない。
130 "_l" が後ろに付かない関数は現在のロケールに基づいてチェックを行う。
131
132 "_l" で終わる関数は、ロケールオブジェクト \fIlocale\fP で指定されたロケールに基づいてチェックを行う。 \fIlocale\fP
133 が特別なロケールオブジェクト \fBLC_GLOBAL_LOCALE\fP (\fBduplocale\fP(3) 参照) の場合や、 \fIlocale\fP
134 が有効なオブジェクトロケールハンドルでない場合、 これらの関数の動作は未定義である。
135
136 以下のリストでは、 "_l" が後ろに付かない関数の動作を説明する。 "_l" で終わる関数は、現在のロケールではなく、ロケールオブジェクト
137 \fIlocale\fP を使う点だけが異なる。
138 .TP 
139 \fBisalnum\fP()
140 英字または数字であるかを調べる。 \fB(isalpha(\fP\fIc\fP\fB) || isdigit(\fP\fIc\fP\fB))\fP と等価である。
141 .TP 
142 \fBisalpha\fP()
143 アルファベットかどうか調べる。標準の \fB"C"\fP ロケールでは \fB(isupper(\fP\fIc\fP\fB) || islower(\fP\fIc\fP\fB))\fP
144 と等価である。他のロケールでは、大文字でも小文字でもない他の文字でも \fBisalpha\fP()  が true を返すことがある。
145 .TP 
146 \fBisascii\fP()
147 \fIc\fP が、ASCII文字セットに合致する 7ビットの \fIunsigned char\fP であるかを調べる。
148 .TP 
149 \fBisblank\fP()
150 空白文字 (スペースかタブ) であるかを調べる。
151 .TP 
152 \fBiscntrl\fP()
153 制御文字かどうかを調べる。
154 .TP 
155 \fBisdigit\fP()
156 数字 (0〜9) かどうかを調べる。
157 .TP 
158 \fBisgraph\fP()
159 表示可能な文字かどうかを調べる。スペースは含まれない。
160 .TP 
161 \fBislower\fP()
162 小文字かどうかを調べる。
163 .TP 
164 \fBisprint\fP()
165 表示可能な文字かどうかを調べる。スペースも含まれる。
166 .TP 
167 \fBispunct\fP()
168 表示可能な文字かどうかを調べる。スペースと英数字は含まれない。
169 .TP 
170 \fBisspace\fP()
171 空白文字かどうかを調べる。 \fB"C"\fP ロケールか \fB"POSIX"\fP ロケールでは、空白文字とは、スペース、フォームフィード
172 (\fB\(aq\ef\(aq\fP)  、改行(newline)  (\fB\(aq\en\(aq\fP)  、復帰(carriage return)
173 (\fB\(aq\er\(aq\fP)  、水平タブ (\fB\(aq\et\(aq\fP)  、垂直タブ (\fB\(aq\ev\(aq\fP)  である。
174 .TP 
175 \fBisupper\fP()
176 大文字かどうかを調べる。
177 .TP 
178 \fBisxdigit\fP()
179 16進数での数字かどうかを調べる。
180 .br
181 \fB0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F\fP の文字であるかどうかを調べることと等価である。
182 .SH 返り値
183 文字 \fIc\fP が調べた文字の種類に合っていれば 0 以外を返す。 そうでなければ 0 を返す。
184 .SH 属性
185 .SS "マルチスレッディング (pthreads(7) 参照)"
186 .\" FIXME: need a thread-safety statement about the *_l functions
187 関数 \fBisalnum\fP(), \fBisalpha\fP(), \fBisascii\fP(), \fBisblank\fP(), \fBiscntrl\fP(),
188 \fBisdigit\fP(), \fBisgraph\fP(), \fBislower\fP(), \fBisprint\fP(), \fBispunct\fP(),
189 \fBisspace\fP(), \fBisupper\fP(), \fBisxdigit\fP() はスレッドセーフである。
190 .SH バージョン
191 \fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(), \fBiscntrl_l\fP(),
192 \fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(), \fBisprint_l\fP(),
193 \fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(), \fBisxdigit_l\fP(),
194 \fBisascii_l\fP() は glibc 2.3 以降で利用可能である。
195 .SH 準拠
196 C89 では \fBisalnum\fP(), \fBisalpha\fP(), \fBiscntrl\fP(), \fBisdigit\fP(), \fBisgraph\fP(),
197 \fBislower\fP(), \fBisprint\fP(), \fBispunct\fP(), \fBisspace\fP(), \fBisupper\fP(),
198 \fBisxdigit\fP() が規定されているが、 \fBisascii\fP() と \fBisblank\fP() は規定されていない。 POSIX.1\-2001
199 でもこれらの関数は規定されており、\fBisascii\fP() と \fBisblank\fP() も規定されている (\fBisascii\fP() は XSI
200 拡張)。 C99 では、ここで挙げた関数のうち \fBisascii\fP() 以外の全てが規定されている。
201
202 POSIX.1\-2008 では \fBisascii\fP()
203 は廃止予定とされている。ローカライズするアプリケーションで移植性がある形では使用できない点に注意すること。
204
205 POSIX.1\-2008 では \fBisalnum_l\fP(), \fBisalpha_l\fP(), \fBisblank_l\fP(),
206 \fBiscntrl_l\fP(), \fBisdigit_l\fP(), \fBisgraph_l\fP(), \fBislower_l\fP(),
207 \fBisprint_l\fP(), \fBispunct_l\fP(), \fBisspace_l\fP(), \fBisupper_l\fP(),
208 \fBisxdigit_l\fP() が規定されている。
209
210 \fBisascii_l\fP() は GNU 拡張である。
211 .SH 注意
212 ある文字がどの種類に入るかということは、現在のロケールに依存する。 たとえば、デフォルトの \fBC\fP ロケールでは \fBisupper\fP()  は A
213 のウムラウトを認識できないので、それが大文字だということがわからない。
214 .SH 関連項目
215 \fBiswalnum\fP(3), \fBiswalpha\fP(3), \fBiswblank\fP(3), \fBiswcntrl\fP(3),
216 \fBiswdigit\fP(3), \fBiswgraph\fP(3), \fBiswlower\fP(3), \fBiswprint\fP(3),
217 \fBiswpunct\fP(3), \fBiswspace\fP(3), \fBiswupper\fP(3), \fBiswxdigit\fP(3),
218 \fBnewlocale\fP(3), \fBsetlocale\fP(3), \fBuselocale\fP(3), \fBtoascii\fP(3),
219 \fBtolower\fP(3), \fBtoupper\fP(3), \fBascii\fP(7), \fBlocale\fP(7)
220 .SH この文書について
221 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
222 である。プロジェクトの説明とバグ報告に関する情報は
223 http://www.kernel.org/doc/man\-pages/ に書かれている。