#include <ctype.h>
int ispunct (char c);
int ispunct_l (int c, locale_t locale);
- DESCRIPTION
-
Checks if the given character is a punctuation character in the current C locale. The default C locale classifies the characters
!"#$%&'()*+,-./:;<⇒?@[\]^_{|}~`
as punctuation.
The behavior is undefined if the value of c
is not representable as
unsigned char
and is not equal to EOF
.
link:src/ispunct1.c[role=include]
- OUTPUT
$ gcc -Wall ispunct1.c $ ./a.out ispunct (_) YES ispunct (`) YES ispunct (a) NO ispunct (b) NO
- EXAMPLE
link:src/ispunct2.c[role=include]
- OUTPUT
$ gcc -Wall ispunct2.c $ ./a.out In the default C locale, \xd7 is not punctuation In ISO-8859-1 locale, \xd7 is punctuation