[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/string/wide/towctrans [Back]  [Original]

std::towctrans cppreference.com
cppreference.com

std::towctrans

cppreference.com
<tbody> </tbody>
std::wint_t towctrans( std::wint_t ch, std::wctrans_t desc );

ch LC_CTYPE C, desc.

ch wchar_t WEOF, .

ch
desc LC_CTYPE, std::wctrans

ch , desc LC_CTYPE C.

.

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

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 << L"  " << kana
               << L"  " << tohira(kana) << L"  \n";
}

:

      

C
() []
C towctrans

Web Proxy Viewer  |  New URL  |  Original Page