Home

iswpunct

iswpunct is a wide-character classification function from the C standard library. It is declared in the header <wctype.h> and takes a wint_t argument representing a wide character. The function tests whether the given wide character is a punctuation character according to the current C locale, as defined by LC_CTYPE.

Return value and behavior: The function returns a nonzero value if the character is a punctuation wide

Usage context: iswpunct is typically used in text processing and tokenization routines that operate on wide

Implementation notes: The prototype is int iswpunct(wint_t wc); implementations may vary across platforms (for example, glibc,

See also: iswalpha, iswdigit, iswspace, iswpunct, iswupper, iswlower; the narrow-character equivalent is punct in <ctype.h>.

character;
otherwise
it
returns
zero.
The
classification
is
locale-dependent;
in
the
default
C
locale,
punctuation
includes
ASCII
characters
such
as
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
:
;
<
=
>
?
@
[
\
]
^
_
`
{
|
}
~.
In
other
locales,
additional
punctuation
marks
may
be
recognized.
characters.
It
is
the
wide-character
counterpart
to
ispunct
from
<ctype.h>
and
relies
on
the
program’s
current
locale
to
determine
punctuation.
musl,
or
Windows),
but
they
conform
to
the
standard
behavior
of
returning
nonzero
for
punctuation
wide
characters.
To
use
iswpunct,
include
<wctype.h>
and,
if
locale-aware
behavior
is
required,
set
the
locale
with
setlocale
or
similar
locale-aware
functions.