function
<cwctype>
iswcntrl
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.
Parameters
- c
- Wide character to be checked, casted to a wint_t, or WEOF.
 wint_t is an integral type.
Return Value
A value different from zero (i.e., true) if indeed c is a control character. Zero (i.e., false) otherwise.
Example
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 
 | /* iswcntrl example */
#include <stdio.h>
#include <wctype.h>
int main ()
{
  int i=0;
  wchar_t str[] = L"first line \n second line \n";
  while (!iswcntrl(str[i]))
  {
    putwchar (str[i]);
    i++;
  }
  return 0;
}
 | 
Output:
See also
- iscntrl
- Check if character is a control character (function)
- iswgraph
- Check if wide character has graphical representation (function)
- iswpunct
- Check if wide character is punctuation character (function)
- iscntrl (locale)
- Check if character is a control character using locale (function template)