iscntrl


iscntrl

Ascertains whether a given character is a control character

 #include <ctype.h> int iscntrl ( int c  ); 

The function iscntrl( ) tests whether its character argument is a control character. For the ASCII character set, these are the character codes from 0 through 31 and 127. The function may yield different results depending on the current locale setting for the localization category LC_CTYPE, which you can query or change using the setlocale( ) function.

If the argument is a control character, iscntrl( ) returns a nonzero value (that is, TRue); if not, the function returns 0 (false).

Example

See the example for isprint( ) in this chapter.

See Also

The corresponding C99 function for wide characters, iswcntrl( ); isalnum( ), isalpha( ), isblank( ), isdigit( ), isgraph( ), islower( ), isprint( ), ispunct( ), isspace( ), isupper( ), isxdigit( ), setlocale( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net