- Documentation
- Reference manual
- Foreign Language Interface
- The Foreign Include File
- Analysing Terms via the Foreign Interface
- Wide-character versions
- PL_new_atom_wchars()
- PL_atom_wchars()
- PL_get_wchars()
- PL_put_wchars()
- PL_unify_wchars()
- PL_unify_wchars_diff()
- PL_utf8_code_point()
- PL_utf8_strlen()
- PL_wcwidth()
- PL_is_id_start()
- PL_is_id_continue()
- PL_is_uppercase()
- PL_is_decimal()
- PL_is_layout()
- PL_ctype_flags()
- PL_toupper()
- PL_tolower()
- PL_totitle()
- Wide-character versions
- Analysing Terms via the Foreign Interface
- The Foreign Include File
- Foreign Language Interface
- Packages
- Reference manual
Availability:C-language interface function
if ( PL_ctype_flags(c) & PL_CTYPE_ALPHA ) ...
PL_CTYPE_ALNUM | PL_CTYPE_ALPHA
or a numeric character |
PL_CTYPE_ALPHA | Unicode Alphabetic |
PL_CTYPE_CNTRL | general category Cc or Cf |
PL_CTYPE_DIGIT | 0 ...9,
as POSIX demands |
PL_CTYPE_GRAPH | printable and not white space |
PL_CTYPE_LOWER | Unicode Lowercase |
PL_CTYPE_PRINT | PL_CTYPE_GRAPH
or white space |
PL_CTYPE_PUNCT | printable, neither alnum nor space |
PL_CTYPE_SPACE | Unicode White_Space |
PL_CTYPE_UPPER | Unicode Uppercase |
This is the classifier behind code_type/2
and char_type/2
and a locale-independent replacement for the <wctype.h>
functions
iswalpha(), iswspace(), ... Besides not varying with
LC_CTYPE, it does not vary between C libraries (glibc and
Darwin disagree on whether U+00A0 and U+0085 are white space, for
example) and it answers for the full Unicode range also on Windows,
where wint_t is 16 bits and the <wctype.h>
functions silently fail for non-BMP code points.