Espaces de noms
Variantes

std::towctrans

De cppreference.com

<metanoindex/>

 
 
Bibliothèque de chaînes de caractères
Chaînes à zéro terminal
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Les chaînes d'octets
Chaines multi-octets
Les chaînes étendues
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
Chaînes à zéro terminal de large
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulation caractère
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversion aux formats numériques
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La manipulation de chaînes
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La manipulation des tableaux
Original:
Array manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wmemcpy
wmemmove
wmemcmp
wmemchr
wmemset
 
<tbody> </tbody>
Déclaré dans l'en-tête <cwctype>
std::wint_t towctrans( std::wint_t wc, std::wctrans_t desc );
Cartes wc le caractère large en utilisant le courant catégorie C LC_CTYPE locale de cartographie identifié par desc .
Original:
Maps the wide character wc using the current C locale's LC_CTYPE mapping category identified by desc.
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 -
le caractère large de cartographier
Original:
the wide character to map
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
desc -
la cartographie LC_CTYPE, obtenu par un appel à std::wctrans
Original:
the LC_CTYPE mapping, obtained from a call to std::wctrans
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

La valeur mappée de ch l'aide de la cartographie identifié par desc dans la facette LC_CTYPE de la localisation en cours C .
Original:
The mapped value of ch using the mapping identified by desc in LC_CTYPE facet of 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.

Exemple

L'exemple suivant montre katakana à mappage de caractères hiragana
Original:
The following example demonstrates katakana to hiragana character mapping
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

std::wstring tohira(std::wstring str)
{
    std::transform(str.begin(), str.end(), str.begin(), [](wchar_t c) {
         return std::towctrans(c, std::wctrans("tojhira"));
    });
    return str;
}

int main()
{
    std::setlocale(LC_ALL, "ja_JP.UTF-8");
    std::wstring kana = L"ヒラガナ";
    std::wcout << "katakana characters " << kana
               << " are " << tohira(kana) << " in hiragana\n";
}

Résultat :

katakana characters ヒラガナ are ひらがな in hiragana

Voir aussi

lève une catégorie mappage des caractères dans la locale courante C
Original:
looks up a character mapping category 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.

(fonction) [edit]
C documentation for towctrans