C examples for wctype.h:iswprint
function
<cwctype> <wctype.h>
Check if wide character is printable
int iswprint (wint_t c);
Parameter | Description |
---|---|
c | Wide character to be checked |
A non zero value (i.e., true) if c is a printable character. Zero (i.e., false) otherwise.
#include <stdio.h> #include <wctype.h> int main ()/*from ww w . ja v a 2 s. c o m*/ { int i=0; wchar_t str[] = L"this is a test first line \n second line \n"; while (iswprint(str[i])) { putwchar (str[i]); i++; } return 0; }