Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctype(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

NCctype

ascii

data stream

     ctype

Purpose

     Classifies characters.

Library

     Standard C Library (libc.a)

Syntax

     #include <ctype.h>

     int isalpha (c)                           int isspace (c)
     int c;                                    int c;

     int isupper (c)                           int ispunct (c)
     int c;                                    int c;

     int islower (c)                           int isprint (c)
     int c;                                    int c;

     int isdigit (c)                           int isgraph (c)
     int c;                                    int c;

     int isxdigit (c)                          int iscntrl (c)
     int c;                                    int c;

     int isalnum (c)                           int isascii (c)
     int c;                                    int c;
     Description

     The ctype macros  classify character-coded integer values
     by table look-up.  Each of these macros returns a nonzero
     value for "true" and 0 for "false."

     The isascii macro is defined for all integer values.  The
     other macros  return a  meaningful value only  if isascii
     returns "true"  for the  same c  value, or  if c  is EOF.
     (See  "standard i/o  library" for  information about  the
     value EOF.)

     The following list shows the set of values for which each
     macro returns a nonzero ("true") value:

     isalpha    c is a letter.

     isupper    c is an uppercase letter.

     islower    c is a lowercase letter.

     isdigit    c is a digit in the range ["0-9"].

     isxdigit   c is a hexadecimal digit in the range ["0-9"],
                ["A-F"] or ["a-f"].

     isalnum    c is alphanumeric (a letter or a digit).

     isspace    c is a space,  tab, carriage return, new-line,
                vertical tab, or form-feed character.

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

     isprint    c is a printing character, ASCII space (040 or
                0x20) through "~" (0176 or 0x7E).

     isgraph    c is  a printing character, like  isprint but,
                unlike isprint, isgraph  returns false (0) for
                the space character.

     iscntrl    c is an ASCII DEL  character (0177 or 0x7F) or
                an ordinary  control character (less  than 040
                or 0x20).

     isascii    c is an ASCII character  whose value is in the
                range 0-0177 (0-0x7F), inclusive.

     Related Information

     In this book:  "NCctype,"  "ascii," and  "data stream."

     "Overview of International Character Support" in Managing
     the AIX Operating System.

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