iswspace - C wctype.h

C examples for wctype.h:iswspace

Type

function

From


<cwctype>
<wctype.h>

Description

Check if wide character is a white-space

Prototype

int iswspace (wint_t c);

Parameters

Parameter Description
c Wide character to be checked

Return Value

A non zero value (i.e., true) if c is a white-space character. Zero (i.e., false) otherwise.

Demo Code


#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;
}

Related Tutorials