X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwctype%2Fiswblank.c;fp=functions%2Fwctype%2Fiswblank.c;h=99fb35c8bc14f5c123e8e5b189150c606fc68709;hb=06630c64aa2ac5b8ec55c3c0509e69da4d81a22b;hp=0000000000000000000000000000000000000000;hpb=e6e196c9d74a3a1d88b244fb0e5a759c47d3da84;p=pdclib diff --git a/functions/wctype/iswblank.c b/functions/wctype/iswblank.c new file mode 100644 index 0000000..99fb35c --- /dev/null +++ b/functions/wctype/iswblank.c @@ -0,0 +1,29 @@ +/* iswblank( wint_t ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include +#ifndef REGTEST +#include <_PDCLIB_locale.h> + +int iswblank( wint_t wc ) +{ + return iswctype( wc, _PDCLIB_CTYPE_BLANK ); +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + TESTCASE(iswblank(L' ')); + TESTCASE(iswblank(L'\t')); + TESTCASE(!iswblank(L'\n')); + TESTCASE(!iswblank(L'a')); + return TEST_RESULTS; +} +#endif