Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
isprint.c File Reference
#include <ctype.h>
Include dependency graph for isprint.c:

Functions

int isprint (int c)
 Checks if the given character can be printed. More...
 

Function Documentation

◆ isprint()

int isprint ( int  ch)

Checks if the given character can be printed.

Checks if the given character can be printed using the default locale. The following characters are printable:

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

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 can be printed, zero otherwise.

Referenced by bad_input(), and good_input().

Here is the caller graph for this function: