Check if wide character is a control character
Checks whether c is a control character.
A control character is a character that does not occupy at least one printing position on a display (this is the opposite of a printable character, checked with iswprint).
This function is the wide-character equivalent of iscntrl (<cctype>): If c translates with wctob to a character for which iscntrl is true, it is always considered a control character by this function too.
In C++, a locale-specific template version of this function (iscntrl) exists in header <locale> for all character types.
- Wide character to be checked, casted to a wint_t, or WEOF.
wint_t is an integral type.
A value different from zero (i.e., true) if indeed c is a control character. Zero (i.e., false) otherwise.
/* iswcntrl example */
int main ()
wchar_t str = L"first line \n second line \n";
- Check if character is a control character (function
- Check if wide character has graphical representation (function
- Check if wide character is punctuation character (function
- iscntrl (locale)
- Check if character is a control character using locale (function template)