Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
isgraph.c File Reference
#include <ctype.h>
Include dependency graph for isgraph.c:

Go to the source code of this file.

Functions

int isgraph (int c)
 Checks if the given character has a graphical representation. More...
 

Function Documentation

◆ isgraph()

int isgraph ( int  ch)

Checks if the given character has a graphical representation.

Checks if the given character has a graphical representation using the default locale. The following characters are graphical:

  • number (0123456789)
  • uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
  • letter (abcdefghijklmnopqrstuvwxyz)
  • punctuation character (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~)

The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.

Parameters
chThe character to classify
Returns
Non-zero value if the character has a graphical representation character, zero otherwise.

Definition at line 5 of file isgraph.c.

6 {
7  return (unsigned)c - 0x21 < 0x5e;
8 }

Referenced by ispunct().

Here is the caller graph for this function: