Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ascii(7)

CTYPE(3)  —  UNIX Programmer’s Manual

NAME

isalnum, isalpha, isascii, iscntrl, isdigit, islower, isprint, ispunct, isspace, isupper, toascii, tolower, toupper − character classification and conversion macros

SYNOPSIS

#include <ctype.h>

isalnum(c)

. . . 

DESCRIPTION

The is∗ macros classify ASCII-coded integer values by table lookup.  Each is a predicate returning nonzero for true, zero for false.  Isascii is defined on all integer values; the rest are defined only where isascii is true and on the single non-ASCII value EOF (see stdio(3S)). If isascii and islower are true, toupper returns an upper-case ASCII character.  If isascii and isupper are true, tolower returns a lower-case ASCII character.  No matter what value c has, toascii returns an ASCII character. 

These following macros return non-zero when c meets the indicated criteria:

isalnum c is an alphanumeric character

isalpha c is a letter

isascii c is an ASCII character, code less than 0200. 

iscntrl c is a delete character (0177) or ordinary control character (less than 040). 

isdigit c is a digit

islower c is a lower case letter

isprint c is a printing character, code 040(8) (space) through 0176 (tilde)

ispunct c is a punctuation character (neither control nor alphanumeric)

isspace c is a space, tab, carriage return, newline, or formfeed

isupper c is an upper case letter

SEE ALSO

ascii(7)

7th Edition

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026