◐ Shell
clean mode source ↗

std::towupper — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

Déclaré dans l'en-tête

<cwctype>

std::wint_t towupper( std::wint_t ch );

Convertit le caractère large en majuscules, si possible .

Original:

Converts the given wide character to uppercase, if possible.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Paramètres

ch -

caractère large à convertir

Original:

wide character to be converted

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Retourne la valeur

Version majuscule d'ch ou ch non modifiée si aucune version majuscule est répertorié dans la locale courante C .

Original:

Uppercase version of ch or unmodified ch if no uppercase version is listed in the current C locale.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Notes

Seulement 1:1 mappage de caractères peut être effectuée par cette fonction, par exemple, la forme majuscule du «ß» est (à quelques exceptions près) les deux chaîne de caractères "SS", qui ne peut être obtenu par std::towupper .

Original:

Only 1:1 character mapping can be performed by this function, e.g. the uppercase form of 'ß' is (with some exceptions) the two-character string "SS", which cannot be obtained by std::towupper.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exemple

Le lettre «s» (U +017 F) latin est la variante minuscules de 'S' (U 0053)

Original:

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <cwctype>
#include <clocale>

int main()
{
    wchar_t c = L'\u017f'; // Latin small letter Long S ('ſ')

    std::cout << std::hex << std::showbase;
    std::cout << "in the default locale, towupper(" << (std::wint_t)c << ") = "
              << std::towupper(c) << '\n';
    std::setlocale(LC_ALL, "en_US.utf8");
    std::cout << "in Unicode locale, towupper(" << (std::wint_t)c << ") = "
              << std::towupper(c) << '\n';
}

Résultat :

in the default locale, towupper(0x17f) = 0x17f
in Unicode locale, towupper(0x17f) = 0x53

Voir aussi

convertit le caractère large en minuscules

Original:

converts a wide character to lowercase

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction) [edit]

convertit un caractère en majuscules en utilisant la facette ctype d'un lieu

Original:

converts a character to uppercase using the ctype facet of a locale

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction générique) [edit]

convertit un caractère en majuscules

Original:

converts a character to uppercase

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction) [edit]

C documentation for towupper