Keil Logo Arm Logo

CARM User's Guide

Discontinued

isdigit

Summary
#include <ctype.h>

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

The isdigit function tests c to determine if it is a decimal digit ('0'-'9').

Return Value

The isdigit function returns a value of 1 if c is a decimal digit or a value of 0 if it is not.

See Also

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

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

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

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

    printf ("isdigit (%c) %s\n", i, p);
  }
}

Keil logo

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.