DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

towlower(S)


towlower, towupper -- translate wide-character code to lowercase or uppercase

Syntax

cc . . . -lc

#include <wchar.h>

wint_t towlower(wint_t wc);

wint_t towupper(wint_t wc);

Description

towlower(S) converts its argument wc to the corresponding lowercase wide-character code as its return value.

towupper(S) converts its argument wc to the corresponding uppercase wide-character code as its return value.

The argument wc must be of type wint_t; its value must be that of a valid wide-character code in the current locale or must equal the value of WEOF. The behaviors of towlower( ) and towupper( ) are undefined if any other value is passed to them.

The case of a wide-character code is defined by character type information in the program locale category LC_CTYPE. The conversion takes place only when wc represents a valid wide character and its corresponding wide character of the opposite case exists. If wc does not have a corresponding wide character of the opposite case, it is returned without any change.

Return values

Upon successful completion, towlower( ) and towupper( ) return the corresponding wide-character code of the opposite case to their argument; otherwise, they return the argument unchanged.

Diagnostics

The value of errno is undefined.

See also

setlocale(S),
X/Open CAE Specification, System Interface Definitions, Issue 4, 1992, Chapter 5, Locale

Standards conformance

towlower( ) and towupper( ) are conformant with:
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003