Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tolower(3) — bsd — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ascii(7)

CTYPE(3)                             BSD                              CTYPE(3)



NAME
     isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct,
     isprint, isgraph, iscntrl, toupper, tolower, isascii, toascii - character
     classification functions and macros

SYNOPSIS
     #include <ctype.h>

     int isalpha(c)
     int(c);

     . . .

     isascii(c)

     toascii(c)

DESCRIPTION
     isascii and toascii are macros, defined on all integer values.  The rest
     are functions, defined where the argument is representable as an unsigned
     char or equals EOF (see stdio(3S)).  If the argument has any other value,
     the behavior is undefined.  These functions and macros return nonzero
     (true) if and only if the value of c conforms to that in the description.

     isalpha    c is a letter.

     isupper    c is an uppercase letter.

     islower    c is a lowercase letter.

     isdigit    c is a digit.

     isxdigit   c is a hex digit.

     isalnum    c is an alphanumeric character.

     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, code 040 (space) through 0176
                (tilde).

     isgraph    c is a printing character, similar to isprint except false for
                space.

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

     isascii    c is an ASCII character, code less than 0200

     tolower    c is converted to lowercase.

     toupper    c is converted to uppercase.

     toascii    c is converted to be a valid ASCII character.

SEE ALSO
     ascii(7)
NOTES
     To have isascii and toascii defined by the header file, add the directive

          #define _BSD_SOURCE

     before any #include directives in your program.  To have the remaining
     functions defined as macros, add the directive

          #define _CLASSIC_CTYPE_MACROS

     before any #include directives.  In this case, the return value of
     tolower is undefined if isupper is false, and the return value of toupper
     is undefined if islower is false.

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