Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctype(S) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ascii(M)



     CTYPE(S)                 XENIX System V                  CTYPE(S)



     Name
          ctype, isalpha, isupper, islower, isdigit, isxdigit,
          isalnum, isspace, ispunct, isprint, isgraph, iscntrl,
          isascii, tolower, toupper, toascii - Classifies or converts
          characters.

     Syntax
          #include <ctype.h>

          int isalpha (c)
          int c;

          . . .

     Description
          These macros classify ASCII-coded integer values by table
          lookup.  Each returns 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(S)).

          isalpha        c is a letter

          isupper        c is an uppercase letter

          islower        c is a lowercase letter

          isdigit        c is a digit [0-9]

          isxdigit       c is a hexidecimal digit [0-9], [A-F] or [a-
                         f]

          isalnum        c is an alphanumeric

          isspace        c is a space, tab, carriage return, newline,
                         vertical tab, or form feed

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

          isprint        c is a printing character, octal 40 (space)
                         through octal 176 (tilde)

          isgraph        c is a printing character, like isprint
                         except false for space










     Page 1                                           (printed 8/7/87)





     CTYPE(S)                 XENIX System V                  CTYPE(S)



          iscntrl        c is a delete character (octal 177) or
                         ordinary control character (less than octal
                         40).

          isascii        c is an ASCII character, code less than 0200

          If the argument to any of these macros is not in the domain
          of the function, the result is undefined.

          The following macros convert to ASCII-coded integer values.
          tolower and toupper are implemented as macros, but can be
          undefined to get non-macro versions from libc.  Non-
          alphabetic values passed to toupper and tolower will be
          returned unchanged.

          tolower
               If c is an uppercase letter, it is returned as a
               lowercase letter

          toupper
               If c is a lowercase letter, it is returned as an
               uppercase letter

          toascii
               c is truncated to the lowest 7 bits

     See Also
          ascii(M)



























     Page 2                                           (printed 8/7/87)



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