#include <ctype.h>
int isgraph (char c);
int isgraph_l (int c, locale_t locale);
- DESCRIPTION
-
Checks if the given character has a graphical representation, i.e. it is either a number (
0123456789
), an uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ
), a lowercase letter (abcdefghijklmnopqrstuvwxyz
), or a punctuation character(!"#$%&'()*+,-./:;<⇒?@[\]^_{|}~`
), or any graphical character specific to the current C locale.
The behavior is undefined if the value of c
is not representable as
unsigned char
and is not equal to EOF
.
link:src/isgraph1.c[role=include]
- OUTPUT
$ gcc -Wall isgraph1.c $ ./a.out isgraph ( ) NO isgraph (!) YES
- EXAMPLE
link:src/isgraph2.c[role=include]
- OUTPUT
$ gcc -Wall isgraph2.c $ ./a.out !"#$%&'()* +,-./01234 56789:;<=> ?@ABCDEFGH IJKLMNOPQR STUVWXYZ[\ ]^_`abcdef ghijklmnop qrstuvwxyz {|}~