Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

conv(3)

/tolower(3)

/toupper(3)

setlocale(3)

towlower(3)  —  Subroutines

NAME

towlower, towupper − Converts uppercase and lowercase wide characters

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <wchar.h> wint_t towlower (
wint_t wc); wint_t towupper (
wint_t wc);

PARAMETER

wcSpecifies the wide character to convert. 

DESCRIPTION

The towlower() function converts the uppercase wide character specified by the wc parameter into the corresponding lowercase wide character. The towupper() function converts the lowercase wide character specified by the wc parameter into the corresponding uppercase wide character. The behavior of the towlower() and towupper() functions are affected by the LC_CTYPE category of the program’s locale.  In a locale where case conversion information is not defined, these functions determine the case of characters according to the rules of the C locale. 

RETURN VALUES

In the towlower() function, if the wc parameter contains a uppercase wide character that has a corresponding lowercase wide character, that wide character is returned. Otherwise, the wc parameter is returned unchanged. 

In the towupper() function, if the wc parameter contains a lowercase wide character that has a corresponding uppercase wide character, that wide character is returned. Otherwise, the wc parameter is returned unchanged. 

RELATED INFORMATION

Functions: conv(3)/tolower(3)/toupper(3), setlocale(3). 

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