isascii

Tests for an ASCII character (function or macro)

Local Servers:nonblocking
Remote Servers:N/A
Classification:Other
Service:Character Manipulation

Syntax

  #include <ctype.h>  
   
  int isascii  (  
     int   c);
  

Parameters

c
(IN) Specifies the character to be tested.

Return Values

The isascii function or macro returns a nonzero value when the character is in the range from 0 to 127. Otherwise, a value of 0 is returned.

Remarks

The isascii function or macro tests for a character in the range from 0 to 127.

See Also

isalpha, isalnum, iscntrl, isdigit, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper

Example

  #include <ctype.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     printf ("%d %d %d \u", isascii (’\u’), isascii (’\f’), 
             isascii (’A’));  
  }
  

produces the following:

  1 1 1