Namensräume
Varianten
Aktionen

std::towctrans

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

 
 
Strings Bibliothek
Null-terminierte Strings
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-Strings
Multibyte-Strings
Wide Strings
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
 
Nullterminierten Wide Strings
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Character Manipulation
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.
Umwandlungen in numerische Formate
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.
String-Manipulation
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.
Array-Manipulation
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 );
Ordnet die Breitzeichen wc mit der aktuellen C Gebietsschemas LC_CTYPE Mapping Kategorie durch desc identifiziert .
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.

Inhaltsverzeichnis

[Bearbeiten] Parameter

ch -
die breite Zeichen abzubilden
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 -
die LC_CTYPE Mapping, von einem Aufruf std::wctrans erhalten
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.

[Bearbeiten] Rückgabewert

Das abgebildete Wert ch mit der Zuordnung durch desc in LC_CTYPE Facette der aktuellen C locale identifiziert .
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.

[Bearbeiten] Beispiel

Das folgende Beispiel zeigt Katakana zu Hiragana-Mapping
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

[Bearbeiten] Siehe auch

sieht eine Zeichenzuordnung Kategorie in der aktuellen C locale
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.

(Funktion) [edit]
C documentation for towctrans