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