Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

isspace - Test for white space character

&pagelevel(4)&pagelevel

Definition

#include <ctype.h>

int isspace(int c);

isspace checks whether the character c from the EBCDIC character set is a white space
character, i.e. a blank, horizontal tab (\t), carriage return (\r), newline (\n), form feed (\f), or
vertical tab (\v).

Return val.

!= 0

0

c is a white space character.

c is not a white space character.

Notes

isspace is implemented both as a macro and as a function (see section “Functions and macros”).

For evaluating control characters for white space (see section “White space” (Basic terms)).

Example

#include <ctype.h>
#include <stdio.h>
int main(void)
{
  int c;
  while((c = getchar()) != EOF)
    printf("%s : %c\n",((isspace(c))? "White space " : "Other"), c);
  return 0;
} 

See also

isalnum, isalpha, isascii, iscntrl, isdigit, islower, isprint, isgraph, ispunct, isupper, isxdigit,
isebcdic, iswspace