function
<cwctype>

iswblank

int iswblank (wint_t c);
Check if wide character is blank
Checks whether c is a blank character.

A blank character is a space character used to separate words within a line of text.

The standard "C" locale considers blank characters the tab character (L'\t') and the space character (L' ').

Other locales may consider blank a different selection of characters, but they must all also be space characters by isspace.

This function is the wide-character equivalent of isblank (<cctype>): If c translates with wctob to a character for which isblank is true, it is always considered a blank character by this function too.

In C++, a locale-specific template version of this function (isblank) exists in header <locale> for all character types.

Parameters

c
Wide character to be checked, casted to a wint_t, or WEOF.
wint_t is an integral type.

Return Value

A value different from zero (i.e., true) if indeed c is a blank character. Zero (i.e., false) otherwise.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* iswblank example */
#include <stdio.h>
#include <wctype.h>
int main ()
{
  wchar_t c;
  int i=0;
  wchar_t str[] = L"Example sentence to test iswblank\n";
  while (str[i])
  {
    c = str[i];
    if (iswblank(c)) c = L'\n';
    putwchar (c);
    i++;
  }
  return 0;
}

Output:
Example
sentence
to
test
iswblank


See also