1 /* towctrans( wint_t, wctrans_t )
\r
3 This file is part of the Public Domain C Library (PDCLib).
\r
4 Permission is granted to use, modify, and / or redistribute at will.
\r
10 #include <_PDCLIB_locale.h>
\r
12 wint_t _PDCLIB_towctrans_l( wint_t wc, wctrans_t trans, locale_t l )
\r
16 case _PDCLIB_WCTRANS_TOLOWER: return _PDCLIB_towlower_l( wc, l );
\r
17 case _PDCLIB_WCTRANS_TOUPPER: return _PDCLIB_towupper_l( wc, l );
\r
22 wint_t towctrans( wint_t wc, wctrans_t trans )
\r
24 return _PDCLIB_towctrans_l( wc, trans, _PDCLIB_threadlocale() );
\r
30 #include <_PDCLIB_test.h>
\r
34 TESTCASE(towctrans(L'a', wctrans("toupper")) == L'A');
\r
35 TESTCASE(towctrans(L'B', wctrans("toupper")) == L'B');
\r
36 TESTCASE(towctrans(L'a', wctrans("tolower")) == L'a');
\r
37 TESTCASE(towctrans(L'B', wctrans("tolower")) == L'b');
\r
38 TESTCASE(towctrans(L'B', wctrans("invalid")) == L'B');
\r
39 TESTCASE(towctrans(L'B', 0) == L'B');
\r
40 return TEST_RESULTS;
\r