| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- character handling
#include <ctype.h>intisalpha(intc);
intisalnum(intc);
intisascii(intc);
intisblank(intc);
intiscntrl(intc);
intisdigit(intc);
intisgraph(intc);
intislower(intc);
intisprint(intc);
intispunct(intc);
intisspace(intc);
intisupper(intc);
intisxdigit(intc);
These macros classify character-coded integer values. Each is a predicate returning non-zerofor true,0 for false. The behavior of these macros, exceptisascii(),is affected by the current locale (seesetlocale(3C)). To modify the behavior,change theLC_TYPE category insetlocale(), that is,setlocale(LC_CTYPE,newlocale). In the“C” locale, or in a locale where character type information is notdefined, characters are classified according to the rules of the US-ASCII 7-bitcoded character set.
Theisascii() macro is defined on all integer values. The rest aredefined only where the argument is anint, the value of whichis representable as anunsigned char, orEOF, which is defined by the<stdio.h> header and represents end-of-file.
Functions exist for all the macros defined below. To get the functionform, the macro name must be undefined (for example,#undef isdigit).
For macros described withDefault andStandard conforming versions, standard-conforming behavior is providedfor standard-conforming applications (seestandards(5)) and for applications that define__XPG4_CHAR_CLASS__ beforeincluding <ctype.h>.
Tests for any character for whichisupper() orislower() is true.
Tests for any character for whichisupper() orislower() is true, or any character that is one of the current locale-defined set of characters for which none ofiscntrl(),isdigit(),ispunct(), orisspace() is true. In “C” locale,isalpha() returns true only for the characters for whichisupper() orislower() is true.
Tests for any character for whichisalpha() orisdigit() is true (letter or digit).
Tests for any ASCII character, code between0 and0177 inclusive.
Tests whetherc is a character of class blank in the current locale. This macro/function is not available to applications conforming to standards prior to SUSv3. Seestandards(5)
Tests for any ``control character'' as defined by the character set.
Tests for any decimal-digit character.
Tests for any character for whichispunct(),isupper(),islower(), andisdigit() is true.
Tests for any character for whichisalnum() andispunct() are true, or any character in the current locale-defined “graph” class which is neither a space (“ ”) nor a character for whichiscntrl() is true.
Tests for any character that is a lower-case letter or is one of the current locale-defined set of characters for which none ofiscntrl(),isdigit(),ispunct(),isspace(), orisupper() is true. In the “C” locale,islower() returns true only for the characters defined as lower-case ASCII characters.
Tests for any character for whichispunct(),isupper(),islower(),isdigit(), and the space character (“ ”) is true.
Tests for any character for whichiscntrl() is false, andisalnum(),isgraph(),ispunct(), the space character (“ ”), and the characters in the current locale-defined “print” class are true.
Tests for any printing character which is neither a space (“ ”) nor a character for whichisalnum() oriscntrl() is true.
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 whichisalnum() is false. In the “C” locale,isspace() returns true only for the standard white-space characters.
Tests for any character that is an upper-case letter or is one of the current locale-defined set of characters for which none ofiscntrl(),isdigit(),ispunct(),isspace(), orislower() is true. In the “C” locale,isupper() returns true only for the characters defined as upper-case ASCII characters.
Tests for any hexadecimal-digit character ([0-9],[A-F], or[a-f]).
Tests for any hexadecimal-digit character ([0-9],[A-F], or[a-f] or the current locale-defined sets of characters representing the hexadecimal digits10 to15 inclusive). In the “C” locale, only
0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
are included.
If the argument to any of the character handling macros is notin the domain of the function, the result is undefined. Otherwise, themacro or function returns non-zero if the classification isTRUE and0if the classification isFALSE.
These macros or functions can be used safely in multithreaded applications, aslong assetlocale(3C) is not being called to change the locale.
Seeattributes(5) for descriptions of the following attributes:
|
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |