isascii
raw OCR
Character classification macro.
Defined in header <ctype.h>
Syntax
#include <ctype.h>
int isascii(int c);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ |
Remarks
isascii is a macro that classifies ASCII-coded integer values by table lookup. It is a predicate returning nonzero for true and 0 for false.
isascii is defined on all integer values.
Return value
isascii returns nonzero if the low order byte of c is in the range 0 to 127 (0x00-0x7F).
Example
#include <ctype.h>
#include <stdio.h>
int main (void)
{
char c = 'C ;
if (isascii(c))
printf("%c is ascii\n",c);
else
printf("%c isn't ascii\n",c);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/ctype.h/isascii/
· short form /3.1/isascii/