Namespace
Varianti

std::towctrans

Da cppreference.com.
< cpp‎ | string‎ | wide

 
 
Stringhe libreria
Null-stringhe terminate
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.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
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
 
Stringhe larghe null-terminated
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Carattere manipolazione
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.
Le conversioni in formati numerici
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.
Della gestione delle stringhe
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.
Matrice manipolazione
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
 
Defined in header <cwctype>
std::wint_t towctrans( std::wint_t wc, std::wctrans_t desc );
Mappe il carattere ampio wc utilizzando categoria LC_CTYPE mappatura della corrente C locale è identificato da 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.

Indice

[modifica] Parametri

ch -
il carattere esteso per mappare
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 mappatura LC_CTYPE, ottenuto da una chiamata a 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.

[modifica] Valore di ritorno

Il valore mappato del ch utilizzando il mapping identificato da desc in aspetto LC_CTYPE della versione locale corrente 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.

[modifica] Esempio

L'esempio seguente mostra la mappatura katakana hiragana carattere
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";
}

Output:

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

[modifica] Vedi anche

cerca una categoria mappatura personaggio nella versione locale corrente 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.

(funzione) [edit]
C documentation for towctrans