ispunct


ispunct

Ascertains whether a given character is a punctuation mark

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

The function ispunct( ) tests whether its character argument is a punctuation mark. If the character is a punctuation mark, ispunct( ) returns a nonzero value (that is, TRue); if not, the function returns 0 (false).

The punctuation characters are dependent on the current locale setting for the category LC_CTYPE, which you can query or change using the setlocale( ) function. In the default locale C, the punctuation characters are all of the graphic characters (those for which isgraph( ) is true), except the alphanumeric characters (those for which isalnum( ) is true).

Example

See the example for isprint( ) in this chapter.

See Also

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



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