This file and its contents are supplied under the terms of the
Common Development and Distribution License ("CDDL"), version 1.0.
You may only use this file in accordance with the terms of version
1.0 of the CDDL.
A full copy of the text of the CDDL should have accompanied this
source. A copy of the CDDL is also available via the Internet at
http://www.illumos.org/license/CDDL.
Copyright (c) 2014 Joyent, Inc. All rights reserved.
Copyright 2014 Garrett D'Amore <garrett@damore.org>
#include <wctype.h> wint_t towctrans(wint_t wc, wctrans_t desc);
wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t loc);
wctrans_t wctrans(const char * tranclass);
wctrans_t wctrans_l(const char * tranclass, locale_t loc);
The functions wctrans() and wctrans_l() are used to obtain a handle to a table that maps one set of wide characters to another. They return an object of type wctrans_t which can be used with the functions towctrans() and towctrans_l() . The valid set of classes that are available depends on the locale. The following names are valid in all locales:
"tolower" Conversion from upper case to lower case characters.
"toupper" Conversion from lower case to upper case characters.
The towctrans() and towctrans_l() functions convert the wide character wc based on the conversion table specified by desc .
The functions towctrans_l() and wctrans_l() are equivalent to the functions towctrans() and wctrans() , but instead of operating in the current locale, they operate on the locale specified by loc .
The wctrans() and wctrans_l() functions will fail if:
EINVAL The mapping class specified by tranclass does not exist or is invalid.
The towctrans() and towctrans_l() functions will fail if:
EINVAL The mapping class specified by desc is invalid.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Standard |
MT-Level MT-Safe |