Previous: , Up: Unicode character classification and properties <unictype.h>   [Contents][Index]


8.14 Classifications like in ISO C

The following character classifications mimic those declared in the ISO C header files <ctype.h> and <wctype.h>. These functions are deprecated, because this set of functions was designed with ASCII in mind and cannot reflect the more diverse reality of the Unicode character set. But they can be a quick-and-dirty porting aid when migrating from wchar_t APIs to Unicode strings.

Function: bool uc_is_alnum (ucs4_t uc)

Tests for any character for which uc_is_alpha or uc_is_digit is true.

Function: bool uc_is_alpha (ucs4_t uc)

Tests for any character for which uc_is_upper or uc_is_lower is true, or any character that is one of a locale-specific set of characters for which none of uc_is_cntrl, uc_is_digit, uc_is_punct, or uc_is_space is true.

Function: bool uc_is_cntrl (ucs4_t uc)

Tests for any control character.

Function: bool uc_is_digit (ucs4_t uc)

Tests for any character that corresponds to a decimal-digit character.

Function: bool uc_is_graph (ucs4_t uc)

Tests for any character for which uc_is_print is true and uc_is_space is false.

Function: bool uc_is_lower (ucs4_t uc)

Tests for any character that corresponds to a lowercase letter or is one of a locale-specific set of characters for which none of uc_is_cntrl, uc_is_digit, uc_is_punct, or uc_is_space is true.

Function: bool uc_is_print (ucs4_t uc)

Tests for any printing character.

Function: bool uc_is_punct (ucs4_t uc)

Tests for any printing character that is one of a locale-specific set of characters for which neither uc_is_space nor uc_is_alnum is true.

Function: bool uc_is_space (ucs4_t uc)

Test for any character that corresponds to a locale-specific set of characters for which none of uc_is_alnum, uc_is_graph, or uc_is_punct is true.

Function: bool uc_is_upper (ucs4_t uc)

Tests for any character that corresponds to an uppercase letter or is one of a locale-specific set of characters for which none of uc_is_cntrl, uc_is_digit, uc_is_punct, or uc_is_space is true.

Function: bool uc_is_xdigit (ucs4_t uc)

Tests for any character that corresponds to a hexadecimal-digit character.

Function: bool uc_is_blank (ucs4_t uc)

Tests for any character that corresponds to a standard blank character or a locale-specific set of characters for which uc_is_alnum is false.


Previous: ISO C and Java syntax, Up: Unicode character classification and properties <unictype.h>   [Contents][Index]