De functie iswprint () in C ++ controleert of het opgegeven brede teken kan worden afgedrukt of niet.
De functie iswprint () is gedefinieerd in het header-bestand.
iswprint () prototype
int iswprint (wint_t ch);
De functie iswprint () controleert of ch kan worden afgedrukt of niet. Standaard kunnen de volgende tekens worden afgedrukt:
- Cijfers (0 t / m 9)
- Hoofdletters (A tot Z)
- Kleine letters (a tot z)
- Leestekens (! "# $% & '() * +, -. /:;? @ () _` (|) ~)
- Ruimte
iswprint () Parameters
- ch: het brede teken dat moet worden gecontroleerd.
iswprint () Retourwaarde
- De functie iswprint () retourneert een waarde die niet nul is als ch kan worden afgedrukt.
- Het geeft nul terug als ch niet kan worden afgedrukt.
Voorbeeld: hoe werkt de functie iswprint ()?
#include #include #include #include using namespace std; int main() ( setlocale(LC_ALL, "en_US.UTF-8"); wchar_t str() = L"Ĥĕllö ĂllĦow are ŷou"; for (int i=0; i
When you run the program, the output will be:
Ĥĕllö Ăll Ħow are ŷou
Here, and are non-printable characters in the string.