iscntrl(), iscntrl_l()

tests if character is a control character 

Function


SYNOPSIS

#include <ctype.h>

int iscntrl(int c);

int iscntrl_l(int c, locale_t locale);


DESCRIPTION

The iscntrl() and iscntrl_l() functions test for any control character or any character for which isprint() of isprint_l() is false.

The behavior of the iscntrl() function is affected by the current locale. To modify the behavior, change the LC_CTYPE category in setlocale() that is, setlocale(LC_CTYPE, newlocale). In the C locale or in a locale where character type information is not defined, characters are classified according to the rules of the U.S. ASCII 7-bit coded character set.

The behavior of the iscntrl_l() function is affected by the specified locale. To modify the behavior, change the LC_CTYPE category in newlocale() that is, newlocale(LC_CTYPE, new_locale). In the C locale or in a locale where character type information is not defined, characters are classified according to the rules of the U.S. ASCII 7-bit coded character set.


PARAMETERS

c 

Is an integer whose value is representable as an unsigned char or the value of the macro EOF.

locale 

Is a locale_t perhaps returned by newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set with uselocale().


RETURN VALUES

The iscntrl() and iscntrl() functions return non-zero for true and zero for false. If the parameter is not in the domain of the function, the return result is undefined.


CONFORMANCE

The function iscntl() conforms to ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

The iscntl() function is MT-Safe as long as no thread calls setlocale() while this function is executing.

The iscntl_l() function is MT-Safe as long as no thread calls freelocale() with the given locale while this function is executing.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
isalnum(), isalnum_l(), isalpha(), isalpha_l(), isascii(), isascii_l(), isdigit(), isdigit_l(), isgraph(), isgraph_l(), islower(), islower_l(), isprint(), isprint_l(), ispunct(), ispunct_l(), isspace(), isspace_l(), isupper(), isupper_l(), isxdigit(), isxdigit_l(), newlocale(), setlocale()


PTC MKS Toolkit 10.5 Documentation Build 40.