Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
C character classification
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Overview of functions == The functions that operate on single-byte characters are defined in ''ctype.h'' header file (''cctype'' in C++). The functions that operate on wide characters are defined in ''wctype.h'' header file (''cwctype'' in C++). The classification is evaluated according to the effective locale. {| class="wikitable" style="font-size:0.85em;" ! Byte<br>character ! Wide<br>character ! Description |- | {{anchor|isalnum}}<code>[http://en.cppreference.com/w/c/string/byte/isalnum isalnum]</code> | {{anchor|iswalnum}}<code>[http://en.cppreference.com/w/c/string/wide/iswalnum iswalnum]</code> | checks whether the operand is alphanumeric |- | {{anchor|isalpha}}<code>[http://en.cppreference.com/w/c/string/byte/isalpha isalpha]</code> | {{anchor|iswalpha}}<code>[http://en.cppreference.com/w/c/string/wide/iswalpha iswalpha]</code> | checks whether the operand is alphabetic |- | {{anchor|islower}}<code>[http://en.cppreference.com/w/c/string/byte/islower islower]</code> | {{anchor|iswlower}}<code>[http://en.cppreference.com/w/c/string/wide/iswlower iswlower]</code> | checks whether the operand is lowercase |- | {{anchor|isupper}}<code>[http://en.cppreference.com/w/c/string/byte/isupper isupper]</code> | {{anchor|iswupper}}<code>[http://en.cppreference.com/w/c/string/wide/iswupper iswupper]</code> | checks whether the operand is an uppercase |- | {{anchor|isdigit}}<code>[http://en.cppreference.com/w/c/string/byte/isdigit isdigit]</code> | {{anchor|iswdigit}}<code>[http://en.cppreference.com/w/c/string/wide/iswdigit iswdigit]</code> | checks whether the operand is a digit |- | {{anchor|isxdigit}}<code>[http://en.cppreference.com/w/c/string/byte/isxdigit isxdigit]</code> | {{anchor|iswxdigit}}<code>[http://en.cppreference.com/w/c/string/wide/iswxdigit iswxdigit]</code> | checks whether the operand is hexadecimal |- | {{anchor|iscntrl}}<code>[http://en.cppreference.com/w/c/string/byte/iscntrl iscntrl]</code> | {{anchor|iswcntrl}}<code>[http://en.cppreference.com/w/c/string/wide/iswcntrl iswcntrl]</code> | checks whether the operand is a control character |- | {{anchor|isgraph}}<code>[http://en.cppreference.com/w/c/string/byte/isgraph isgraph]</code> | {{anchor|iswgraph}}<code>[http://en.cppreference.com/w/c/string/wide/iswgraph iswgraph]</code> | checks whether the operand is a graphical character |- | {{anchor|isspace}}<code>[http://en.cppreference.com/w/c/string/byte/isspace isspace]</code> | {{anchor|iswspace}}<code>[http://en.cppreference.com/w/c/string/wide/iswspace iswspace]</code> | checks whether the operand is [[Whitespace character|space]] |- | {{anchor|isblank}}<code>[http://en.cppreference.com/w/c/string/byte/isblank isblank]</code> | {{anchor|iswblank}}<code>[http://en.cppreference.com/w/c/string/wide/iswblank iswblank]</code> | checks whether the operand is a blank space character |- | {{anchor|isprint}}<code>[http://en.cppreference.com/w/c/string/byte/isprint isprint]</code> | {{anchor|iswprint}}<code>[http://en.cppreference.com/w/c/string/wide/iswprint iswprint]</code> | checks whether the operand is a printable character |- | {{anchor|ispunct}}<code>[http://en.cppreference.com/w/c/string/byte/ispunct ispunct]</code> | {{anchor|iswpunct}}<code>[http://en.cppreference.com/w/c/string/wide/iswpunct iswpunct]</code> | checks whether the operand is punctuation |- | {{anchor|tolower}}<code>[http://en.cppreference.com/w/c/string/byte/tolower tolower]</code> | {{anchor|towlower}}<code>[http://en.cppreference.com/w/c/string/wide/towlower towlower]</code> | converts the operand to lowercase |- | {{anchor|toupper}}<code>[http://en.cppreference.com/w/c/string/byte/toupper toupper]</code> | {{anchor|towupper}}<code>[http://en.cppreference.com/w/c/string/wide/towupper towupper]</code> | converts the operand to uppercase |- | {{n/a}} | {{anchor|iswctype}}<code>[http://en.cppreference.com/w/c/string/wide/iswctype iswctype]</code> | checks whether the operand falls into specific class |- | {{n/a}} | {{anchor|towctrans}}<code>[http://en.cppreference.com/w/c/string/wide/towctrans towctrans]</code> | converts the operand using a specific mapping |- | {{n/a}} | {{anchor|wctype}}<code>[http://en.cppreference.com/w/c/string/wide/wctype wctype]</code> | returns a wide character class to be used with <code>iswctype</code> |- | {{n/a}} | {{anchor|wctrans}}<code>[http://en.cppreference.com/w/c/string/wide/wctrans wctrans]</code> | returns a transformation mapping to be used with <code>towctrans</code> |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)