Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

towupper_l(3C)

Name

towupper, towupper_l - transliterate lowercase wide-character code to uppercase

Synopsis

#include <wchar.h>

wint_t towupper(wint_t wc);
wint_t towupper_l(wint_t wc, locale_t locale);

Description

The towupper() function has as a domain a type wint_t, the value of which must be a character representable as a wchar_t, and must be a wide-character code corresponding to a valid character in the current locale or the value of WEOF. If the argument has any other value, the argument is returned unchanged. If the argument of towupper() represents a lowercase wide-character code (as defined by character type information in the program locale category LC_CTYPE), the result is the corresponding uppercase wide-character code. All other arguments in the domain are returned unchanged.

The towupper_l() function is equivalent to the towupper() function, except that the locale data used is from the locale represented by locale.

The behavior is undefined if the locale argument to towupper_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

Return Values

Upon successful completion, towupper() and towupper_l() return the uppercase letter corresponding to the argument passed. Otherwise, they return the argument unchanged.

Errors

No errors are defined.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
CSI
Enabled
Interface Stability
Standard
MT-Level
MT-Safe

See Also

duplocale(3C), freelocale(3C), iswalpha(3C), newlocale(3C), setlocale(3C), towlower(3C), uselocale(3C), attributes(7), standards(7)