OSDN Git Service

145c48399328b427feb18ca87c2509b15c025461
[linuxjm/LDP_man-pages.git] / release / 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 .SH 名前
38 isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
39 isprint, ispunct, isspace, isupper, isxdigit \- 文字を分類する
40 .SH 書式
41 .nf
42 .B #include <ctype.h>
43 .sp
44 .BI "int isalnum(int " "c" );
45 .br
46 .BI "int isalpha(int " "c" );
47 .br
48 .BI "int isascii(int " "c" );
49 .br
50 .BI "int isblank(int " "c" );
51 .br
52 .BI "int iscntrl(int " "c" );
53 .br
54 .BI "int isdigit(int " "c" );
55 .br
56 .BI "int isgraph(int " "c" );
57 .br
58 .BI "int islower(int " "c" );
59 .br
60 .BI "int isprint(int " "c" );
61 .br
62 .BI "int ispunct(int " "c" );
63 .br
64 .BI "int isspace(int " "c" );
65 .br
66 .BI "int isupper(int " "c" );
67 .br
68 .BI "int isxdigit(int " "c" );
69 .fi
70 .sp
71 .in -4n
72 glibc 向けの機能検査マクロの要件
73 .RB ( feature_test_macros (7)
74 参照):
75 .in
76 .sp
77 .ad l
78 .BR isascii ():
79 .RS 4
80 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
81 .br
82 .RE
83 .BR isblank ():
84 .RS 4
85 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
86 _POSIX_C_SOURCE\ >=\ 200112L;
87 .br
88 or
89 .I cc\ -std=c99
90 .RE
91 .ad
92 .SH 説明
93 これらの関数は、現在のロケールに従って
94 .I c
95 を分類する。
96 .I c
97
98 .I unsigned char
99
100 .B EOF
101 でなければならない。
102 .TP
103 .BR isalnum ()
104 英字または数字であるかを調べる。
105 .BI "(isalpha(" c ") || isdigit(" c "))" \fR
106 と等価である。
107 .TP
108 .BR isalpha ()
109 アルファベットかどうか調べる。標準の \fB"C"\fP ロケールでは
110 .BI "(isupper(" c ") || islower(" c "))" \fR
111 と等価である。他のロケールでは、大文字でも小文字でもない他の文字でも
112 .BR isalpha ()
113 が true を返すことがある。
114 .TP
115 .BR isascii ()
116 \fIc\fP が、ASCII文字セットに合致する 7ビットの
117 .I unsigned char
118 であるかを調べる。
119 .TP
120 .BR isblank ()
121 空白文字 (スペースかタブ) であるかを調べる。
122 .TP
123 .BR iscntrl ()
124 制御文字かどうかを調べる。
125 .TP
126 .BR isdigit ()
127 数字 (0〜9) かどうかを調べる。
128 .TP
129 .BR isgraph ()
130 表示可能な文字かどうかを調べる。スペースは含まれない。
131 .TP
132 .BR islower ()
133 小文字かどうかを調べる。
134 .TP
135 .BR isprint ()
136 表示可能な文字かどうかを調べる。スペースも含まれる。
137 .TP
138 .BR ispunct ()
139 表示可能な文字かどうかを調べる。スペースと英数字は含まれない。
140 .TP
141 .BR isspace ()
142 空白文字かどうかを調べる。
143 .B """C"""
144 ロケールか
145 .B """POSIX"""
146 ロケールでは、空白文字とは、スペース、フォームフィード
147 .RB ( \(aq\ef\(aq )
148 、改行(newline)
149 .RB ( \(aq\en\(aq )
150 、復帰(carriage return)
151 .RB ( \(aq\er\(aq )
152 、水平タブ
153 .RB ( \(aq\et\(aq )
154 、垂直タブ
155 .RB ( \(aq\ev\(aq )
156 である。
157 .TP
158 .BR isupper ()
159 大文字かどうかを調べる。
160 .TP
161 .BR isxdigit ()
162 16進数での数字かどうかを調べる。
163 .br
164 .B "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F"
165 の文字であるかどうかを調べることと等価である。
166 .SH 返り値
167 文字
168 .I c
169 が調べた文字の種類に合っていれば 0 以外を返す。
170 そうでなければ 0 を返す。
171 .SH 準拠
172 C99, 4.3BSD.
173 C89 では、これらの関数のうち
174 .BR isascii ()
175
176 .BR isblank ()
177 以外の
178 すべてが規定されている。
179 .BR isascii ()
180 は BSD や SVr4 の拡張である。
181 .BR isblank ()
182 は POSIX.1-2001 と C99 7.4.1.3 に準拠している。
183 POSIX.1-2008 は、
184 .BR isascii ()
185 を廃止予定としている。
186 ローカライズされたアプリケーションでは、移植性を確保しつつ、
187 この関数を使用することはできない点に注意すること。
188 .SH 注意
189 ある文字がどの種類に入るかということは、現在のロケールに依存する。
190 たとえば、デフォルトの
191 .B "C"
192 ロケールでは
193 .BR isupper ()
194 は A のウムラウトを認識できないので、それが大文字だということがわからない。
195 .SH 関連項目
196 .BR iswalnum (3),
197 .BR iswalpha (3),
198 .BR iswblank (3),
199 .BR iswcntrl (3),
200 .BR iswdigit (3),
201 .BR iswgraph (3),
202 .BR iswlower (3),
203 .BR iswprint (3),
204 .BR iswpunct (3),
205 .BR iswspace (3),
206 .BR iswupper (3),
207 .BR iswxdigit (3),
208 .BR setlocale (3),
209 .BR toascii (3),
210 .BR tolower (3),
211 .BR toupper (3),
212 .BR ascii (7),
213 .BR locale (7)