Keil Logo

iscntrl

Summary
#include <ctype.h>

int iscntrl (
  int c);   /* character to test */
Description

The iscntrl function tests c to determine if it is a control character (0x00-0x1F or 0x7F).

Return Value

The iscntrl function returns a value of 1 if c is a control character or a value of 0 if it is not.

See Also

isalnum, isalpha, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit

Example
#include <ctype.h>
#include <stdio.h> /* for printf */

void tst_iscntrl (void) {
  unsigned char i;
  char *p;

  for (i = 0; i < 128; i++) {
    p = (iscntrl (i) ? "YES" : "NO");

    printf ("iscntrl (%c) %s\n", i, p);
  }
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.