Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chrtbl(1M)

ctype(3C)

ascii(5)

environ(5)

CONV(3C)                             SysV                             CONV(3C)



NAME
     conv: toupper, tolower, _toupper, _tolower, toascii - translate
     characters

SYNOPSIS
     #include <ctype.h>

     int toupper (c)
     int c;

     int tolower (c)
     int c;

     int _toupper (c)
     int c;

     int _tolower (c)
     int c;

     int toascii (c)
     int c;

DESCRIPTION
     These functions and macros convert their arguments from lowercase
     (uppercase) to uppercase (lowercase).  If c is a character for which
     islower (see ctype(3C)) is true, toupper returns the corresponding
     uppercase character, if it exists.  Otherwise, toupper returns c.  If c
     is a character for which isupper (see ctype(3C)) is true, tolower returns
     the corresponding lowercase character, if it exists.  Otherwise, tolower
     returns c.

     The macros _toupper and _tolower accomplish the same thing as toupper and
     tolower, but have restricted domains and are faster.  If c is outside
     their domain, _toupper and _tolower return undefined values.

     toascii turns off the bits of c that are not part of an ASCII character.

     The conversion functions and macros do a table lookup.  This table gets
     initialized in ways depending upon whether or not a call to setchrclass
     has been made, and the value of the environment variable CHRCLASS.  See
     ctype(3C).

SEE ALSO
     chrtbl(1M), ctype(3C), ascii(5), environ(5).

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