iswprint - C wctype.h

C examples for wctype.h:iswprint

Type

function

From


<cwctype>
<wctype.h>

Description

Check if wide character is printable

Prototype

int iswprint (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 printable character. Zero (i.e., false) otherwise.

Demo Code


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

Related Tutorials