Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man3c/ctype.3c
Real path: /usr/share/man/man3c/ctype.3c
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" Portions Copyright (c) 2005, 2021, Oracle and/or its affiliates. .\" Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in The Oracle Solaris, from IEEE Std 1003.1, 2008 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2001-2008 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH ctype 3C "11 May 2021" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME ctype, isalpha, isalnum, isascii, isblank, iscntrl, isdigit, islower, isprint, isspace, isupper, ispunct, isgraph, isxdigit, isalpha_l, isalnum_l, isblank_l, iscntrl_l, isdigit_l, isgraph_l, islower_l, isprint_l, ispunct_l, isspace_l, isupper_l, isxdigit_l \- character handling .SH SYNOPSIS .LP .nf #include <ctype.h> \fBint\fR \fBisalpha\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisalnum\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisascii\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisblank\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBiscntrl\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisdigit\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisgraph\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBislower\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisprint\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBispunct\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisspace\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisupper\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisxdigit\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBint\fR \fBisalpha_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisalnum_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisblank_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBiscntrl_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisdigit_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisgraph_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBislower_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisprint_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBispunct_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisspace_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisupper_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .LP .nf \fBint\fR \fBisxdigit_l\fR(\fBint\fR \fIc\fR, \fBlocale_t\fR \fIlocale\fR); .fi .SH DESCRIPTION .sp .LP "These macros" here refers to interfaces listed in the \fBNAME\fR and \fBSYNOPSIS\fR sections, except those end their names with \fB_l\fR. Interfaces whose names end with \fB_l\fR are provided only as functions and they are described later in this section. .sp .LP These macros classify character-coded integer values. Each is a predicate returning non-zero for true, \fB0\fR for false. The behavior of these macros, except \fBisascii()\fR, is affected by the current locale (see \fBsetlocale\fR(3C)). To modify the behavior, change the \fBLC_TYPE\fR category in \fBsetlocale()\fR, that is, \fBsetlocale(\fR\fBLC_CTYPE\fR, \fInewlocale\fR). In the "C" locale, or in a locale where character type information is not defined, characters are classified according to the rules of the \fBUS-ASCII\fR 7-bit coded character set. .sp .LP The \fBisascii()\fR macro is defined on all integer values. The rest are defined only where the argument is an \fBint\fR, the value of which is representable as an \fBunsigned char\fR, or \fBEOF\fR, which is defined by the <\fBstdio.h\fR> header and represents end-of-file. .sp .LP Functions exist for all the macros defined below. To get the function form, the macro name must be undefined (for example, \fB#undef isdigit\fR). .sp .LP In addition to the SUSv4 conforming applications, if \fB__XPG7_THREAD_MODEL__\fR is defined before including <\fBctype.h\fR>, the following are provided as functions that are fully MT-Safe without any exceptions: .sp .in +2 .nf isalnum() isalpha() isblank() iscntrl() isdigit() isgraph() islower() isprint() ispunct() isspace() isupper() isxdigit() tolower() toupper() .fi .in -2 .sp .sp .LP Unlike the macros corresponding to these functions that are not available with the \fB__XPG7_THREAD_MODEL__\fR or the SUSv4 conformance, the following macros will still be available with the SUSv4 conformance and also with the \fB__XPG7_THREAD_MODEL__\fR defined since they are not using any of the global variables and also inherently MT-Safe without any exceptions: .sp .in +2 .nf isascii() toascii() .fi .in -2 .sp .sp .LP The \fBisascii()\fR and the \fBtoascii()\fR functions are marked obsolescent by the SUSv4 standard. For more information, see the \fBstandards\fR(7) man page. .sp .LP Interfaces whose names end with \fB_l\fR are provided only as functions. Each of them is equivalent to corresponding function whose name doesn't end with \fB_l\fR, except that interface whose name ends with \fB_l\fR uses locale represented by <\fIlocale\fR>. .sp .LP For example, \fBisalpha_l()\fR is equivalent to function version of \fBisalpha()\fR, except that \fBisalpha_l()\fR uses locale represented by <\fIlocale\fR>, instead of current locale. .sp .LP The behavior is undefined if the <\fIlocale\fR> argument to \fBisalpha_l()\fR is the special locale object \fBLC_GLOBAL_LOCALE\fR or is not a valid locale object handle. .sp .LP For macros described with \fBDefault\fR and \fBStandard conforming\fR versions, standard-conforming behavior is provided for standard-conforming applications (see \fBstandards\fR(7)) and for applications that define \fB__XPG4_CHAR_CLASS__\fR before including <\fBctype.h\fR>. .SS "Default" .sp .ne 2 .mk .na \fB\fBisalpha()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBisupper()\fR or \fBislower()\fR is true. .RE .SS "Standard conforming" .sp .ne 2 .mk .na \fB\fBisalpha()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBisupper()\fR or \fBislower()\fR is true, or any character that is one of the current locale-defined set of characters for which none of \fBiscntrl()\fR, \fBisdigit()\fR, \fBispunct()\fR, or \fBisspace()\fR is true. In "C" locale, \fBisalpha()\fR returns true only for the characters for which \fBisupper()\fR or \fBislower()\fR is true. .RE .sp .ne 2 .mk .na \fB\fBisalnum()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBisalpha()\fR or \fBisdigit()\fR is true (letter or digit). .RE .sp .ne 2 .mk .na \fB\fBisascii()\fR\fR .ad .RS 11n .rt Tests for any ASCII character, code between \fB0\fR and \fB0177\fR inclusive. .RE .sp .ne 2 .mk .na \fB\fBisblank()\fR\fR .ad .RS 11n .rt Tests whether \fIc\fR is a character of class blank in the current locale. This macro/function is not available to applications conforming to standards prior to SUSv3. See \fBstandards\fR(7) .RE .sp .ne 2 .mk .na \fB\fBiscntrl()\fR\fR .ad .RS 11n .rt Tests for any \fBcontrol character\fR as defined by the character set. .RE .sp .ne 2 .mk .na \fB\fBisdigit()\fR\fR .ad .RS 11n .rt Tests for any decimal-digit character. .RE .SS "Default" .sp .ne 2 .mk .na \fB\fBisgraph()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBispunct()\fR, \fBisupper()\fR, \fBislower()\fR, and \fBisdigit()\fR is true. .RE .SS "Standard conforming" .sp .ne 2 .mk .na \fB\fBisgraph()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBisalnum()\fR and \fBispunct()\fR are true, or any character in the current locale-defined "graph" class which is neither a space ("\|") nor a character for which \fBiscntrl()\fR is true. .RE .sp .ne 2 .mk .na \fB\fBislower()\fR\fR .ad .RS 11n .rt Tests for any character that is a lowercase letter or is one of the current locale-defined set of characters for which none of \fBiscntrl()\fR, \fBisdigit()\fR, \fBispunct()\fR, \fBisspace()\fR, or \fBisupper()\fR is true. In the "C" locale, \fBislower()\fR returns true only for the characters defined as lowercase \fBASCII\fR characters. .RE .SS "Default" .sp .ne 2 .mk .na \fB\fBisprint()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBispunct()\fR, \fBisupper()\fR, \fBislower()\fR, \fBisdigit()\fR, and the space character ("\|") is true. .RE .SS "Standard conforming" .sp .ne 2 .mk .na \fB\fBisprint()\fR\fR .ad .RS 11n .rt Tests for any character for which \fBiscntrl()\fR is false, and \fBisalnum()\fR, \fBisgraph()\fR, \fBispunct()\fR, the space character ("\|"), and the characters in the current locale-defined "print" class are true. .RE .sp .ne 2 .mk .na \fB\fBispunct()\fR\fR .ad .RS 11n .rt Tests for any printing character which is neither a space ("\|") nor a character for which \fBisalnum()\fR or \fBiscntrl()\fR is true. .RE .sp .ne 2 .mk .na \fB\fBisspace()\fR\fR .ad .RS 11n .rt Tests for any space, tab, carriage-return, newline, vertical-tab or form-feed (standard white-space characters) or for one of the current locale-defined set of characters for which \fBisalnum()\fR is false. In the "C" locale, \fBisspace()\fR returns true only for the standard white-space characters. .RE .sp .ne 2 .mk .na \fB\fBisupper()\fR\fR .ad .RS 11n .rt Tests for any character that is an uppercase letter or is one of the current locale-defined set of characters for which none of \fBiscntrl()\fR, \fBisdigit()\fR, \fBispunct()\fR, \fBisspace()\fR, or \fBislower()\fR is true. In the "C" locale, \fBisupper()\fR returns true only for the characters defined as uppercase \fBASCII\fR characters. .RE .SS "Default" .sp .ne 2 .mk .na \fB\fBisxdigit()\fR\fR .ad .RS 12n .rt Tests for any hexadecimal-digit character (\fB[0\(mi9]\fR, \fB[A\(miF]\fR, or \fB[a\(mif]\fR). .RE .SS "Standard conforming" .sp .ne 2 .mk .na \fB\fBisxdigit()\fR\fR .ad .RS 12n .rt Tests for any hexadecimal-digit character (\fB[0\(mi9]\fR, \fB[A\(miF]\fR, or \fB[a\(mif]\fR or the current locale-defined sets of characters representing the hexadecimal digits \fB10\fR to \fB15\fR inclusive). In the "C" locale, only .sp .sp .in +2 .nf 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f .fi .in -2 .sp are included. .RE .SH RETURN VALUES .sp .LP If the argument to any of the character handling macros is not in the domain of the function, the result is undefined. If the argument <\fBc\fR> to any of the character handling macros and functions is not in the domain of the macro or function, the result is undefined. Otherwise, the macro or function returns non-zero if the classification is \fBTRUE\fR and \fB0\fR if the classification is \fBFALSE\fR. .SH USAGE .sp .LP The macros or functions whose names don't end with \fB_l\fR can be used safely in multithreaded applications, as long as \fBsetlocale\fR(3C) is not being called to change the locale. .sp .LP The functions whose names end with \fB_l\fR can be used safely in multithreaded applications. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ CSI Enabled _ Interface Stability Committed _ MT-Level MT-Safe _ Standard See \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBduplocale\fR(3C), \fBfreelocale\fR(3C), \fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBstdio\fR(3C), \fBuselocale\fR(3C), \fBascii\fR(7), \fBenviron\fR(7), \fBstandards\fR(7)