Character Manipulation Function
int iscntrl(int c);
int iswcntrl(wint_t c);
int _istcntrl(_TINT c);
Internationalization (I18n) Function Overview
The iscntrl function returns a non-zero value if c is a control character (0x00 - 0x1F or 0x7F).
iswctrl is the wide character version of iscntrl ,
testing the wide character c .
_istcntrl is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either iscntrl or iswcntrl .
I18n Issues
Use the appropriate version of the function as required for internationalization support, noting the following:
There is no multibyte version of iscntrl . However, since the test is for a character in the ASCII range,
this function will work for multibyte characters, as long as the test is made on the initial byte of the multibyte character.
Prior to calling iscntrl on both ANSI and Windows platforms, and iswcntrl on ANSI platforms, ensure that the locale is set correctly, since
the result of the test condition depends on the locale's LC_CTYPE category setting.
On Windows platforms, the iswcntrl test is independent of locale.
Recommended Replacements*
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.
Character Manipulation
Functions
|