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

Go to the source code of this file.

Functions

int isspace (int c)
 Checks if the given character is a whitespace character. More...
 

Function Documentation

◆ isspace()

int isspace ( int  ch)

Checks if the given character is a whitespace character.

Checks if the given character is a whitespace character. The following are examples of a whitespace character:

  • space (0x20)
  • feed (0x0c)
  • line feed (0x0a)
  • carriage return (0x0d)
  • horizontal tab (0x09)
  • vertical tab (0x0b)

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 is a whitespace character, zero otherwise.

Definition at line 5 of file isspace.c.

6 {
7  return c == ' ' || (unsigned)c - '\t' < 5;
8 }

Referenced by atol(), atoll(), strtol(), strtoll(), strtoul(), and strtoull().

Here is the caller graph for this function: