Char.isdigit метод
Содержание:
- COPYRIGHT top
- DESCRIPTION top
- Açıklamalar
- IsDigit(Char)
- IsDigit(String, Int32)
- Character Classes
- Python NumPy
- SYNOPSIS top
- CONFORMING TO top
- NOTES top
- CONFORMING TO top
- 備註
- IsDigit(Char)
- IsDigit(String, Int32)
- Description
- Комментарии
- IsDigit(Char)
- IsDigit(String, Int32)
- Library Functions
- NOTES top
- 4.1 Классификация символов
- DESCRIPTION top
- Description
- DESCRIPTION top
COPYRIGHT top
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version 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.unix.org/online.html . Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . IEEE/The Open Group 2013 ISDIGIT(3P)
Pages that refer to this page:
ctype.h(0p),
isalnum(3p),
isalnum_l(3p),
isalpha(3p),
isalpha_l(3p),
isblank(3p),
isblank_l(3p),
iscntrl(3p),
iscntrl_l(3p),
isgraph(3p),
isgraph_l(3p),
islower(3p),
islower_l(3p),
isprint(3p),
isprint_l(3p),
ispunct(3p),
ispunct_l(3p),
isspace(3p),
isspace_l(3p),
isupper(3p),
isupper_l(3p),
isxdigit(3p),
isxdigit_l(3p),
setlocale(3p)
DESCRIPTION top
These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the "_l" suffix perform the check based on the current locale. The functions with the "_l" suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle. The list below explains the operation of the functions without the "_l" suffix; the functions with the "_l" suffix differ only in using the locale object locale instead of the current locale. isalnum() checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)). isalpha() checks for an alphabetic character; in the standard "C" locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase. isascii() checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. isblank() checks for a blank character; that is, a space or a tab. iscntrl() checks for a control character. isdigit() checks for a digit (0 through 9). isgraph() checks for any printable character except space. islower() checks for a lowercase character. isprint() checks for any printable character including space. ispunct() checks for any printable character which is not a space or an alphanumeric character. isspace() checks for white-space characters. In the "C" and "POSIX" locales, these are: space, form-feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). isupper() checks for an uppercase letter. isxdigit() checks for hexadecimal digits, that is, one of 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.
Açıklamalar
Geçerli basamaklar kategorinin üyeleridir.Valid digits are members of the category.
IsDigit(Char)
Belirtilen Unicode karakterinin ondalık sayı olarak kategorilere ayrılmadığını gösterir.Indicates whether the specified Unicode character is categorized as a decimal digit.
Parametreler
-
c
- Char
Değerlendirilecek Unicode karakteri.The Unicode character to evaluate.
Döndürülenler
- Boolean
bir ondalık sayı ise, aksi durumda, . if is a decimal digit; otherwise, .
Açıklamalar
Bu yöntem, bir için bir Char radyan x-10 basamağı olup olmadığını belirler.This method determines whether a Char is a radix-10 digit. Bu IsNumber , herhangi bir sayısal Unicode kategorisi olup olmadığını belirleyen ile karşıtdır .This contrasts with IsNumber, which determines whether a is of any numeric Unicode category. Sayılar, kesirler, alt simgeler, üst simgeler, Romen rakamları, para birimi payları, şifreli sayılar ve betiğe özgü basamaklar gibi karakterler içerir.Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
Geçerli basamaklar kategorinin üyeleridir.Valid digits are members of the category.
- Boolean
IsDigit(String, Int32)
Belirtilen dizedeki belirtilen konumdaki karakterin ondalık sayı olarak kategorilere ayrılmadığını gösterir.Indicates whether the character at the specified position in a specified string is categorized as a decimal digit.
Parametreler
-
s
- String
Bir dize.A string.
-
index
- Int32
İçinde değerlendirilecek karakterin konumu .The position of the character to evaluate in .
Döndürülenler
- Boolean
konumundaki karakter ondalık bir sayı ise, aksi durumda, . if the character at position in is a decimal digit; otherwise, .
Özel durumlar
ArgumentNullException
, değeridir. is .
ArgumentOutOfRangeException
sıfırdan küçük veya en son konumdan büyük . is less than zero or greater than the last position in .
Açıklamalar
Bu yöntem, bir için bir Char radyan x-10 basamağı olup olmadığını belirler.This method determines whether a Char is a radix-10 digit. Bu IsNumber , herhangi bir sayısal Unicode kategorisi olup olmadığını belirleyen ile karşıtdır Char .This contrasts with IsNumber, which determines whether a Char is of any numeric Unicode category. Sayılar, kesirler, alt simgeler, üst simgeler, Romen rakamları, para birimi payları, şifreli sayılar ve betiğe özgü basamaklar gibi karakterler içerir.Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
Bir dizedeki karakter konumları sıfırdan başlayarak dizine alınır.Character positions in a string are indexed starting from zero.
Geçerli basamaklar kategorinin üyeleridir.Valid digits are members of the category.
- Boolean
Character Classes
Sr.No. | Character Class & Description |
---|---|
1 |
Digits This is a set of whole numbers { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }. |
2 |
Hexadecimal digits This is the set of { 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f }. |
3 |
Lowercase letters This is a set of lowercase letters { a b c d e f g h i j k l m n o p q r s t u v w x y z }. |
4 |
Uppercase letters This is a set of uppercase letters {A B C D E F G H I J K L M N O P Q R S T U V W X Y Z }. |
5 |
Letters This is a set of lowercase and uppercase letters. |
6 |
Alphanumeric characters This is a set of Digits, Lowercase letters and Uppercase letters. |
7 |
Punctuation characters This is a set of ! » # $ % & ‘ ( ) * + , — . / : ; < = > ? @ ^ _ ` { | } ~ |
8 |
Graphical characters This is a set of Alphanumeric characters and Punctuation characters. |
9 |
Space characters This is a set of tab, newline, vertical tab, form feed, carriage return, and space. |
10 |
Printable characters This is a set of Alphanumeric characters, Punctuation characters and Space characters. |
11 |
Control characters In ASCII, these characters have octal codes 000 through 037, and 177 (DEL). |
12 |
Blank characters These are spaces and tabs. |
13 |
Alphabetic characters This is a set of Lowercase letters and Uppercase letters. |
Previous Page
Print Page
Next Page
Python NumPy
NumPy IntroNumPy Getting StartedNumPy Creating ArraysNumPy Array IndexingNumPy Array SlicingNumPy Data TypesNumPy Copy vs ViewNumPy Array ShapeNumPy Array ReshapeNumPy Array IteratingNumPy Array JoinNumPy Array SplitNumPy Array SearchNumPy Array SortNumPy Array FilterNumPy Random
Random Intro
Data Distribution
Random Permutation
Seaborn Module
Normal Distribution
Binomial Distribution
Poisson Distribution
Uniform Distribution
Logistic Distribution
Multinomial Distribution
Exponential Distribution
Chi Square Distribution
Rayleigh Distribution
Pareto Distribution
Zipf Distribution
NumPy ufunc
ufunc Intro
ufunc Create Function
ufunc Simple Arithmetic
ufunc Rounding Decimals
ufunc Logs
ufunc Summations
ufunc Products
ufunc Differences
ufunc Finding LCM
ufunc Finding GCD
ufunc Trigonometric
ufunc Hyperbolic
ufunc Set Operations
SYNOPSIS top
#include <ctype.h> int isalnum(int c); int isalpha(int c); int iscntrl(int c); int isdigit(int c); int isgraph(int c); int islower(int c); int isprint(int c); int ispunct(int c); int isspace(int c); int isupper(int c); int isxdigit(int c); int isascii(int c); int isblank(int c); int isalnum_l(int c, locale_t locale); int isalpha_l(int c, locale_t locale); int isblank_l(int c, locale_t locale); int iscntrl_l(int c, locale_t locale); int isdigit_l(int c, locale_t locale); int isgraph_l(int c, locale_t locale); int islower_l(int c, locale_t locale); int isprint_l(int c, locale_t locale); int ispunct_l(int c, locale_t locale); int isspace_l(int c, locale_t locale); int isupper_l(int c, locale_t locale); int isxdigit_l(int c, locale_t locale); int isascii_l(int c, locale_t locale); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): isascii(): _XOPEN_SOURCE || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _SVID_SOURCE isblank(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L isalnum_l(), isalpha_l(), isblank_l(), iscntrl_l(), isdigit_l(), isgraph_l(), islower_l(), isprint_l(), ispunct_l(), isspace_l(), isupper_l(), isxdigit_l(): Since glibc 2.10: _XOPEN_SOURCE >= 700 Before glibc 2.10: _GNU_SOURCE isascii_l(): Since glibc 2.10: _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE) Before glibc 2.10: _GNU_SOURCE
CONFORMING TO top
C89 specifies isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), and isxdigit(), but not isascii() and isblank(). POSIX.1-2001 also specifies those functions, and also isascii() (as an XSI extension) and isblank(). C99 specifies all of the preceding functions, except isascii(). POSIX.1-2008 marks isascii() as obsolete, noting that it cannot be used portably in a localized application. POSIX.1-2008 specifies isalnum_l(), isalpha_l(), isblank_l(), iscntrl_l(), isdigit_l(), isgraph_l(), islower_l(), isprint_l(), ispunct_l(), isspace_l(), isupper_l(), and isxdigit_l(). isascii_l() is a GNU extension.
NOTES top
The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example: char c; ... res = toupper((unsigned char) c); This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char. The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.
CONFORMING TO top
C89 specifies isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), and isxdigit(), but not isascii() and isblank(). POSIX.1-2001 also specifies those functions, and also isascii() (as an XSI extension) and isblank(). C99 specifies all of the preceding functions, except isascii(). POSIX.1-2008 marks isascii() as obsolete, noting that it cannot be used portably in a localized application. POSIX.1-2008 specifies isalnum_l(), isalpha_l(), isblank_l(), iscntrl_l(), isdigit_l(), isgraph_l(), islower_l(), isprint_l(), ispunct_l(), isspace_l(), isupper_l(), and isxdigit_l(). isascii_l() is a GNU extension.
備註
有效的數位是 類別目錄的成員。Valid digits are members of the category.
IsDigit(Char)
指示指定的 Unicode 字元是否分類為十進位數字。Indicates whether the specified Unicode character is categorized as a decimal digit.
-
c
- Char
要評估的 Unicode 字元。The Unicode character to evaluate.
- Boolean
當 是十進位數字時為 ,否則為 。 if is a decimal digit; otherwise, .
備註
這個方法會判斷是否 Char 為基數10位數。This method determines whether a Char is a radix-10 digit. 這會與進行比較 IsNumber ,以判斷是否 為任何數值 Unicode 類別目錄。This contrasts with IsNumber, which determines whether a is of any numeric Unicode category. 數位包括分數、注標、上標、羅馬數字、貨幣分子、encircled 數位和腳本特定數位等字元。Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
有效的數位是 類別目錄的成員。Valid digits are members of the category.
- Boolean
IsDigit(String, Int32)
指示指定的字串中指定位置處的字元是否分類為十進位數字。Indicates whether the character at the specified position in a specified string is categorized as a decimal digit.
-
s
- String
字串。A string.
-
index
- Int32
要評估的字元在 中的位置。The position of the character to evaluate in .
- Boolean
當 中位於 的字元是十進位數字時為 ,否則為 。 if the character at position in is a decimal digit; otherwise, .
例外狀況
ArgumentNullException
為 。 is .
ArgumentOutOfRangeException
小於零或大於 中的最後一個位置。 is less than zero or greater than the last position in .
備註
這個方法會判斷是否 Char 為基數10位數。This method determines whether a Char is a radix-10 digit. 這會與進行比較 IsNumber ,以判斷是否 Char 為任何數值 Unicode 類別目錄。This contrasts with IsNumber, which determines whether a Char is of any numeric Unicode category. 數位包括分數、注標、上標、羅馬數字、貨幣分子、encircled 數位和腳本特定數位等字元。Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
字串中的字元位置會從零開始編制索引。Character positions in a string are indexed starting from zero.
有效的數位是 類別目錄的成員。Valid digits are members of the category.
- Boolean
Description
These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according
to the current locale.
- isalnum()
- checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).
- isalpha()
- checks for an alphabetic character; in the standard «C» locale, it is equivalent to (isupper(c) || islower(c)). In
some locales, there may be additional characters for which isalpha() is true-letters which are neither upper case nor lower case. - isascii()
- checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.
- isblank()
- checks for a blank character; that is, a space or a tab.
- iscntrl()
- checks for a control character.
- isdigit()
- checks for a digit (0 through 9).
- isgraph()
- checks for any printable character except space.
- islower()
- checks for a lower-case character.
- isprint()
- checks for any printable character including space.
- ispunct()
- checks for any printable character which is not a space or an alphanumeric character.
- isspace()
- checks for white-space characters. In the «C» and «POSIX» locales, these are: space, form-feed (‘\f’), newline (‘\n’), carriage
return (‘\r’), horizontal tab (‘\t’), and vertical tab (‘\v’). - isupper()
- checks for an uppercase letter.
- isxdigit()
- checks for a hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.
Комментарии
Допустимые цифры являются элементами категории.Valid digits are members of the category.
IsDigit(Char)
Показывает, относится ли указанный символ Юникода к категории десятичных цифр.Indicates whether the specified Unicode character is categorized as a decimal digit.
Параметры
-
c
- Char
Знак Юникода, который необходимо вычислить.The Unicode character to evaluate.
Возвращаемое значение
- Boolean
Значение , если является десятичной цифрой; в противном случае — значение . if is a decimal digit; otherwise, .
Комментарии
Этот метод определяет, Char является ли десятичная цифра десятичной.This method determines whether a Char is a radix-10 digit. Это отличает с IsNumber , который определяет, имеет ли Любая числовая Категория Юникода.This contrasts with IsNumber, which determines whether a is of any numeric Unicode category. Числа включают в себя такие символы, как дроби, индексы, надстрочные знаки, римские цифры, числители валют, енЦирклед числа и цифры для конкретного сценария.Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
Допустимые цифры являются элементами категории.Valid digits are members of the category.
- Boolean
IsDigit(String, Int32)
Показывает, относится ли указанный символ Юникода в указанной позиции в указанной строке к категории десятичных цифр.Indicates whether the character at the specified position in a specified string is categorized as a decimal digit.
Параметры
-
s
- String
Строка.A string.
-
index
- Int32
Позиция символа, который необходимо вычислить в .The position of the character to evaluate in .
Возвращаемое значение
- Boolean
, если символ в позиции в является десятичной цифрой; в противном случае — . if the character at position in is a decimal digit; otherwise, .
Исключения
ArgumentNullException
имеет значение . is .
ArgumentOutOfRangeException
Параметр имеет значение меньше нуля или больше последней позиции в . is less than zero or greater than the last position in .
Комментарии
Этот метод определяет, Char является ли десятичная цифра десятичной.This method determines whether a Char is a radix-10 digit. Это отличает с IsNumber , который определяет, имеет ли Char Любая числовая Категория Юникода.This contrasts with IsNumber, which determines whether a Char is of any numeric Unicode category. Числа включают в себя такие символы, как дроби, индексы, надстрочные знаки, римские цифры, числители валют, енЦирклед числа и цифры для конкретного сценария.Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.
Позиции символов в строке индексируются начиная с нуля.Character positions in a string are indexed starting from zero.
Допустимые цифры являются элементами категории.Valid digits are members of the category.
- Boolean
Library Functions
Following are the functions defined in the header ctype.h −
Sr.No. | Function & Description |
---|---|
1 |
int isalnum(int c)
This function checks whether the passed character is alphanumeric. |
2 |
int isalpha(int c)
This function checks whether the passed character is alphabetic. |
3 |
int iscntrl(int c)
This function checks whether the passed character is control character. |
4 |
int isdigit(int c)
This function checks whether the passed character is decimal digit. |
5 |
int isgraph(int c)
This function checks whether the passed character has graphical representation using locale. |
6 |
int islower(int c)
This function checks whether the passed character is lowercase letter. |
7 |
int isprint(int c)
This function checks whether the passed character is printable. |
8 |
int ispunct(int c)
This function checks whether the passed character is a punctuation character. |
9 |
int isspace(int c)
This function checks whether the passed character is white-space. |
10 |
int isupper(int c)
This function checks whether the passed character is an uppercase letter. |
11 |
int isxdigit(int c)
This function checks whether the passed character is a hexadecimal digit. |
The library also contains two conversion functions that accepts and returns an «int».
Sr.No. | Function & Description |
---|---|
1 |
int tolower(int c)
This function converts uppercase letters to lowercase. |
2 |
int toupper(int c)
This function converts lowercase letters to uppercase. |
NOTES top
The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example: char c; ... res = toupper((unsigned char) c); This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char. The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.
4.1 Классификация символов
Этот раздел объясняет библиотечные функции для классификации
символов. Например, isalpha — функция, чтобы проверить буквенный ли
символ. Она имеет один аргумент, символ для проверки, и возвращает целое
число отличное от нуля, если символ буквенный, и нуль иначе. Ее можно
использовть примерно так:
Атрибуты любого данного символа могут измениться между стандартами.
См. Главу 19 , для уточнения информации относительно
стандартов.
Эти функции объявлены в заголовочном файле «ctype.h».
- int islower (int c) (функция)
-
Возвращает истину, если C — символ нижнего регистра.
- int isupper (int c) (функция)
-
Возвращает истину, если C — символ верхнего регистра.
- int isalpha (int c) (функция)
-
Возвращает истину, если C — буквенный символ (буква). Если islower
или isupper — истина для символа, то isalpha — также истина.В некоторых стандартах , могут иметься дополнительные символы, для
которых isalpha является истинной, и которые не являются, ни строчными
буквами, ни символами верхнего регистра. Но в стандарте «C», не имеется
никаких таких дополнительных символов. - int isdigit (int c) (функция)
-
Возвращает истину, если C — десятичная цифра (от «0» до «9»).
- int isalnum (int c) (функция)
-
Возвращает истину, если C — алфавитно-цифровой символ (символ или
цифра); другими словами, если или isalpha или isdigit — истина для
символа, то isalnum — также истина. - int isxdigit (int c) (функция)
-
Возвращает истину, если C — шестнадцатеричная цифра.
Шестнадцатеричные цифры включают нормальные десятичные цифры от «0» до
«9» и символы от «А» до «F» и от «a» до «f». - int ispunct ( int c) (функция)
-
Возвращает истину, если C — символ пунктуации. Это означает любой
символ печати, который не алфавитно-цифровой или пробел. - int isspace (int c) (функция)
-
Возвращает истину, если C — символ пропуска. В стандартном
расположении, isspace возвращает истину только для стандартных символов
пробела: - int isblank (int c) (функция)
-
Возвращает истину, если C — знак пропуска; то есть пробел или метка
табуляции. Эта функция — расширение GNU. - int isgraph (int c) (функция)
-
Возвращает истину, если C — графический символ; то есть символ,
который имеет glyph, связанный с этим. Символы пропуска не
рассматриваются как графические символы. - int isprint (int c) (функция)
-
Возвращает истину, если C — символ печати. Символы печати включают
все графические символы, плюс пробел (» «). - int iscntrl (int c) (функция)
-
Возвращает истину, если C — управляющий символ (то есть символ,
который не является символом печати). - int isascii (int c) (функция)
-
Возвращает истину, если C 7-битовое символьное значение без знака,
которое вписываться в US/UK ASCII набор символов. Эта функция — BSD
расширение и — также SVID расширение.
DESCRIPTION top
For isdigit(): The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1‐2008 defers to the ISO C standard. The isdigit() and isdigit_l() functions shall test whether c is a character of class digit in the current locale, or in the locale represented by locale, respectively; see the Base Definitions volume of POSIX.1‐2008, Chapter 7, Locale. The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined. The behavior is undefined if the locale argument to isdigit_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.
Description
These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according
to the current locale.
- isalnum()
- checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).
- isalpha()
- checks for an alphabetic character; in the standard «C» locale, it is equivalent to (isupper(c) || islower(c)). In
some locales, there may be additional characters for which isalpha() is true-letters which are neither upper case nor lower case. - isascii()
- checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.
- isblank()
- checks for a blank character; that is, a space or a tab.
- iscntrl()
- checks for a control character.
- isdigit()
- checks for a digit (0 through 9).
- isgraph()
- checks for any printable character except space.
- islower()
- checks for a lower-case character.
- isprint()
- checks for any printable character including space.
- ispunct()
- checks for any printable character which is not a space or an alphanumeric character.
- isspace()
- checks for white-space characters. In the «C» and «POSIX» locales, these are: space, form-feed (‘\f’), newline (‘\n’), carriage
return (‘\r’), horizontal tab (‘\t’), and vertical tab (‘\v’). - isupper()
- checks for an uppercase letter.
- isxdigit()
- checks for a hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.
DESCRIPTION top
These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the "_l" suffix perform the check based on the current locale. The functions with the "_l" suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle. The list below explains the operation of the functions without the "_l" suffix; the functions with the "_l" suffix differ only in using the locale object locale instead of the current locale. isalnum() checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)). isalpha() checks for an alphabetic character; in the standard "C" locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase. isascii() checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. isblank() checks for a blank character; that is, a space or a tab. iscntrl() checks for a control character. isdigit() checks for a digit (0 through 9). isgraph() checks for any printable character except space. islower() checks for a lowercase character. isprint() checks for any printable character including space. ispunct() checks for any printable character which is not a space or an alphanumeric character. isspace() checks for white-space characters. In the "C" and "POSIX" locales, these are: space, form-feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). isupper() checks for an uppercase letter. isxdigit() checks for hexadecimal digits, that is, one of 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.