OpenBSD manual page server

Manual Page Search Parameters

ISWCTYPE(3) Library Functions Manual ISWCTYPE(3)

iswctype, iswctype_ltest whether a wide character belongs to a character class

#include <wctype.h>

int
iswctype(wint_t wc, wctype_t charclass);

int
iswctype_l(wint_t wc, wctype_t charclass, locale_t locale);

These functions test whether the wide character wc belongs to charclass.

The behaviour is undefined if charclass or wc is invalid. When charclass is retrieved with wctype(3), it becomes invalid when the thread-specific character encoding locale is changed with uselocale(3) or when the global character encoding locale is changed with setlocale(3). When charclass is retrieved with wctype_l(3), it is only valid for use with the same locale argument.

These functions return zero if the character tests false or non-zero if the character tests true.

iswalnum(3), newlocale(3), setlocale(3), towctrans(3), wctype(3)

The iswctype() function conforms to ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”), and iswctype_l() to IEEE Std 1003.1-2008 (“POSIX.1”).

The iswctype() function has been available since OpenBSD 3.8, and iswctype_l() since OpenBSD 6.2.

September 5, 2017 OpenBSD-7.0