Funkcija towctrans () programmā C ++ pārveido doto plašo rakstzīmi atbilstoši noteiktai transformācijai.
Funkcija towctrans () ir definēta galvenes failā.
towctrans () prototips
wint_t towctrans (wint_t wc, wctype_t desc);
Funkcija towctrans () pielieto pārveidojumu plašajam rakstzīmei wc, ko norādījis desc.
towctrans () Parametri
- wc: Platais raksturs, kas jāpārveido.
- desc: transformācija, kas tiek iegūta, izsaucot uz wctrans ().
towctrans () Atgriežamā vērtība
- Funkcija towctrans () atgriež vērtību, kas nav nulle, ja wc ir desc norādītais rekvizīts, pretējā gadījumā atgriež nulli.
Piemērs: Kā darbojas towctrans () funkcija?
#include #include #include #include using namespace std; int main() ( setlocale(LC_ALL, "en_US.UTF-8"); wchar_t str() = L"Ŝŵitĉhiňģ Ćăse"; wcout << L"Before transformation" << endl; wcout << str << endl; for(int i=0; i
When you run the program, the output will be:
Before transformation Ŝŵitĉhiňģ Ćăse After transformation ŝŴITĈHIŇĢ ćĂSE