C Standard Libraries C++

towupper()

Declaration

int towupper(wint_t wChar);

Description

This function transforms the unicode valued argument that is passed in to the corresponding uppercase character value in the unicode table. If the value is an lowercase character value, it can be transformed and the transformed value is returned. Otherwise, the value "wChar" is returned.

Example

#include <iostream>
#include <cwctype>

int main() {
    using namespace std;

    wcout << "Lowercase: " << L'x' << endl;
    wcout << "Uppercase: " << (wchar_t)towupper(L'x') << endl;

    return 0;
}

Output

towupper() Output
 

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