'\"macro stdmacro
.if n .pH g3c.conv @(#)conv	40.15 of 10/24/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} conv 3C "C Programming Language Utilities" "\&"
.if \nX=1 .ds x} conv 3C "C Programming Language Utilities"
.if \nX=2 .ds x} conv 3C "" "\&"
.if \nX=3 .ds x} conv "" "" "\&"
.TH \*(x}
.SH NAME
\f4conv: toupper\f1, \f4tolower\f1, \f4_toupper\f1, \f4_tolower\f1, \f4toascii\f1 \- translate characters
.SH SYNOPSIS
.nf
\f4#include <ctype.h>\f1
.PP
\f4int toupper (int c);\f1
.PP
\f4int tolower (int c);\f1
.PP
\f4int _toupper (int c);\f1
.PP
\f4int _tolower (int c);\f1
.PP
\f4int toascii (int c);\f1
.SH DESCRIPTION
\f4toupper\f1
and
\f4tolower\fP
have as their domain the range of the function
\f4getc\fP:
all values represented in an
\f4unsigned char\f1
and the value of the macro \f4EOF\f1
as defined in \f4stdio.h\f1.
If the argument of
\f4toupper\fP
represents a lower-case letter, the
result is the corresponding upper-case
letter.
If the argument of
\f4tolower\fP
represents an upper-case letter, the
result is the corresponding lower-case
letter.
All other arguments in the domain are
returned unchanged.
.PP
The macros \f4_toupper\fP
and
\f4_tolower\fP
accomplish the same things as
\f4toupper\fP
and
\f4tolower\fP, respectively,
but have restricted domains and are faster.
\f4_toupper\fP
requires a lower-case letter as its argument;
its result is the corresponding upper-case letter.
\f4_tolower\fP
requires an upper-case letter as its argument;
its result is the corresponding lower-case letter.
Arguments outside the domain cause undefined results.
.PP
\f4toascii\fP
yields its argument with all bits turned off that are not
part of a standard 7-bit
.SM ASCII
character; it is intended for compatibility
with other systems.
.PP
\f4toupper\fP, \f4tolower\fP, \f4_toupper\fP, and\f4_tolower\fP are affected by
\f4LC_CTYPE\fP.
In the \f4C\fP locale, or in a locale where shift information
is not defined, these functions determine the case of characters according to
the rules of the \s-1ASCII\s+1-coded character set.
Characters outside the \s-1ASCII\s+1 range
of characters are returned unchanged.
.SH SEE ALSO
\f4ctype\fP(3C), \f4getc\fP(3S), \f4setlocale\fP(3C), \f4environ\fP(5).
.\"	@(#)conv.3c	6.2 of 10/20/83
.Ee
