C Standard Libraries C++

towctrans()

Declaration

wint_t towctrans(wint_t wChar, wctype_t qCategory);

Description

This function transforms the argument that is passed in as "wChar" to a unicode value in the category defined by "qCategory." If the value can be transformed, the transformed value is returned. Otherwise, "wChar" is returned.

Example

#include <iostream>
#include <cwctype>

int main() {
    using namespace std;

    wcout << "Lowercase: " << L'g' << endl;
    wcout << "Uppercase: " <<
        (wchar_t)towctrans(L'g', wctype("upper")) << endl;

    return 0;
}

Output

towctrans() Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.