std::towctrans
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <cwctype>
|
||
| std::wint_t towctrans( std::wint_t wc, std::wctrans_t desc ); |
||
Asigna el carácter ancho
wc usando mapeo categoría LC_CTYPE de la localización actual de C identificada por 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.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
| ch | - | el carácter amplio asignar
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 | - | el mapeo LC_CTYPE, obtenido a partir de una llamada 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. |
[editar] Valor de retorno
El valor asignado de
ch utilizando la asignación identificado por desc en faceta LC_CTYPE de la actual configuración regional 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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ejemplo
El siguiente ejemplo muestra katakana a la cartografía de carácter 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.
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
[editar] Ver también
| busca una categoría de asignación de caracteres en el actual entorno nacional 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. (función) | |
| C documentation for towctrans
|

