.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" License. .\" .\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu) .\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt .\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de) .\" .\" Japanese Version Copyright (c) 1997 Ueyama Rui .\" all rights reserved. .\" Translated 1997-08-29, Ueyama Rui .\" Updated 1999-07-16, Kentaro Shirakata .\" Updated 2005-02-26, Akihiro MOTOKI .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46 .\" .TH ISALPHA 3 2010-09-20 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, .\"O isprint, ispunct, isspace, isupper, isxdigit \- character .\"O classification routines isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit \- 文字を分類する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "int isalnum(int " "c" ); .br .BI "int isalpha(int " "c" ); .br .BI "int isascii(int " "c" ); .br .BI "int isblank(int " "c" ); .br .BI "int iscntrl(int " "c" ); .br .BI "int isdigit(int " "c" ); .br .BI "int isgraph(int " "c" ); .br .BI "int islower(int " "c" ); .br .BI "int isprint(int " "c" ); .br .BI "int ispunct(int " "c" ); .br .BI "int isspace(int " "c" ); .br .BI "int isupper(int " "c" ); .br .BI "int isxdigit(int " "c" ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR isascii (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE .br .RE .BR isblank (): .RS 4 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad .\"O .SH DESCRIPTION .SH 説明 .\"O These functions check whether .\"O .IR c , .\"O which must have the value of an .\"O .I unsigned char .\"O or .\"O .BR EOF , .\"O falls into a certain character class according to the current locale. これらの関数は、現在のロケールに従って .I c を分類する。 .I c は .I unsigned char か .B EOF でなければならない。 .TP .BR isalnum () .\"O checks for an alphanumeric character; it is equivalent to .\"O .BI "(isalpha(" c ") || isdigit(" c "))" \fR. 英字または数字であるかを調べる。 .BI "(isalpha(" c ") || isdigit(" c "))" \fR と等価である。 .TP .BR isalpha () .\"O checks for an alphabetic character; in the standard \fB"C"\fP .\"O locale, it is equivalent to .\"O .BI "(isupper(" c ") || islower(" c "))" \fR. .\"O In some locales, there may be additional characters for which .\"O .BR isalpha () .\"O is true\-\-letters which are neither upper case nor lower .\"O case. アルファベットかどうか調べる。標準の \fB"C"\fP ロケールでは .BI "(isupper(" c ") || islower(" c "))" \fR と等価である。他のロケールでは、大文字でも小文字でもない他の文字でも .BR isalpha () が true を返すことがある。 .TP .BR isascii () .\"O checks whether \fIc\fP is a 7-bit .\"O .I unsigned char .\"O value that fits into .\"O the ASCII character set. \fIc\fP が、ASCII文字セットに合致する 7ビットの .I unsigned char であるかを調べる。 .TP .BR isblank () .\"O checks for a blank character; that is, a space or a tab. 空白文字 (スペースかタブ) であるかを調べる。 .TP .BR iscntrl () .\"O checks for a control character. 制御文字かどうかを調べる。 .TP .BR isdigit () .\"O checks for a digit (0 through 9). 数字 (0〜9) かどうかを調べる。 .TP .BR isgraph () .\"O checks for any printable character except space. 表示可能な文字かどうかを調べる。スペースは含まれない。 .TP .BR islower () .\"O checks for a lower-case character. 小文字かどうかを調べる。 .TP .BR isprint () .\"O checks for any printable character including space. 表示可能な文字かどうかを調べる。スペースも含まれる。 .TP .BR ispunct () .\"O checks for any printable character which is not a space or an .\"O alphanumeric character. 表示可能な文字かどうかを調べる。スペースと英数字は含まれない。 .TP .BR isspace () .\"O checks for white-space characters. .\"O In the .\"O .B """C""" .\"O and .\"O .B """POSIX""" .\"O locales, these are: space, form-feed .\"O .RB ( \(aq\ef\(aq ), .\"O newline .\"O .RB ( \(aq\en\(aq ), .\"O carriage return .\"O .RB ( \(aq\er\(aq ), .\"O horizontal tab .\"O .RB ( \(aq\et\(aq ), .\"O and vertical tab .\"O .RB ( \(aq\ev\(aq ). .\"O .TP .\"O .BR isupper () .\"O checks for an uppercase letter. 空白文字かどうかを調べる。 .B """C""" ロケールか .B """POSIX""" ロケールでは、空白文字とは、スペース、フォームフィード .RB ( \(aq\ef\(aq ) 、改行(newline) .RB ( \(aq\en\(aq ) 、復帰(carriage return) .RB ( \(aq\er\(aq ) 、水平タブ .RB ( \(aq\et\(aq ) 、垂直タブ .RB ( \(aq\ev\(aq ) である。 .TP .BR isupper () .\"O checks for an uppercase letter. 大文字かどうかを調べる。 .TP .BR isxdigit () .\"O checks for a hexadecimal digits, that is, one of .\"O .br .\"O .BR "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" . 16進数での数字かどうかを調べる。 .br .B "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" の文字であるかどうかを調べることと等価である。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The values returned are nonzero if the character .\"O .I c .\"O falls into the tested class, and a zero value .\"O if not. 文字 .I c が調べた文字の種類に合っていれば 0 以外を返す。 そうでなければ 0 を返す。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O C99, 4.3BSD. .\"O C89 specifies all of these functions except .\"O .BR isascii () .\"O and .\"O .BR isblank (). .\"O .BR isascii () .\"O is a BSD extension .\"O and is also an SVr4 extension. .\"O .BR isblank () .\"O conforms to POSIX.1-2001 and C99 7.4.1.3. C99, 4.3BSD. C89 では、これらの関数のうち .BR isascii () と .BR isblank () 以外の すべてが規定されている。 .BR isascii () は BSD や SVr4 の拡張である。 .BR isblank () は POSIX.1-2001 と C99 7.4.1.3 に準拠している。 .\"O POSIX.1-2008 marks .\"O .BR isascii () .\"O as obsolete, .\"O noting that it cannot be used portably in a localized application. POSIX.1-2008 は、 .BR isascii () を廃止予定としている。 ローカライズされたアプリケーションでは、移植性を確保しつつ、 この関数を使用することはできない点に注意すること。 .\"O .SH NOTES .SH 注意 .\"O The details of what characters belong into which class depend on the current .\"O locale. .\"O For example, .\"O .BR isupper () .\"O will not recognize an A-umlaut (\(:A) as an uppercase letter in the default .\"O .B "C" .\"O locale. ある文字がどの種類に入るかということは、現在のロケールに依存する。 たとえば、デフォルトの .B "C" ロケールでは .BR isupper () は A のウムラウトを認識できないので、それが大文字だということがわからない。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR iswalnum (3), .BR iswalpha (3), .BR iswblank (3), .BR iswcntrl (3), .BR iswdigit (3), .BR iswgraph (3), .BR iswlower (3), .BR iswprint (3), .BR iswpunct (3), .BR iswspace (3), .BR iswupper (3), .BR iswxdigit (3), .BR setlocale (3), .BR toascii (3), .BR tolower (3), .BR toupper (3), .BR ascii (7), .BR locale (7)