Funktsioon towctrans () C ++ -s teisendab antud laia märgi vastavalt määratud teisendusele.
Funktsioon towctrans () on määratletud päisefailis.
towctrans () prototüüp
wint_t towctrans (wint_t wc, wctype_t desc);
Funktsioon towctrans () rakendab teisenduse desc määratud laiale tähemärgile wc.
towctrans () Parameetrid
- wc: lai tähemärk, mida tuleb muuta.
- desc: teisendus, mis saadakse kutsest wctrans ().
towctrans () Tagastusväärtus
- Funktsioon towctrans () tagastab nullväärtuse, kui wc-l on desc määratud omadus, vastasel juhul tagastatakse null.
Näide: kuidas funktsioon towctrans () töötab?
#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