2002-09-20 22:13:11 +02:00
|
|
|
/*
|
|
|
|
FUNCTION
|
2016-08-15 14:21:52 +02:00
|
|
|
<<iswxdigit>>, <<iswxdigit_l>>---hexadecimal digit wide character test
|
2002-09-20 22:13:11 +02:00
|
|
|
|
|
|
|
INDEX
|
|
|
|
iswxdigit
|
|
|
|
|
2016-08-15 14:21:52 +02:00
|
|
|
INDEX
|
|
|
|
iswxdigit_l
|
|
|
|
|
2017-11-30 08:17:11 +01:00
|
|
|
SYNOPSIS
|
2002-09-20 22:13:11 +02:00
|
|
|
#include <wctype.h>
|
|
|
|
int iswxdigit(wint_t <[c]>);
|
|
|
|
|
2016-08-15 14:21:52 +02:00
|
|
|
#include <wctype.h>
|
|
|
|
int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>);
|
|
|
|
|
2002-09-20 22:13:11 +02:00
|
|
|
DESCRIPTION
|
2005-10-28 23:33:23 +02:00
|
|
|
<<iswxdigit>> is a function which classifies wide character values that
|
2002-09-20 22:13:11 +02:00
|
|
|
are hexadecimal digits.
|
|
|
|
|
2016-08-15 14:21:52 +02:00
|
|
|
<<iswxdigit_l>> is like <<iswxdigit>> but performs the check based on the
|
|
|
|
locale specified by the locale object locale. If <[locale]> is
|
|
|
|
LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
|
|
|
|
|
2002-09-20 22:13:11 +02:00
|
|
|
RETURNS
|
2016-08-15 14:21:52 +02:00
|
|
|
<<iswxdigit>>, <<iswxdigit_l>> return non-zero if <[c]> is a hexadecimal digit wide character.
|
2002-09-20 22:13:11 +02:00
|
|
|
|
|
|
|
PORTABILITY
|
|
|
|
<<iswxdigit>> is C99.
|
2016-08-15 14:21:52 +02:00
|
|
|
<<iswxdigit_l>> is POSIX-1.2008.
|
2002-09-20 22:13:11 +02:00
|
|
|
|
|
|
|
No supporting OS subroutines are required.
|
|
|
|
*/
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <wctype.h>
|
|
|
|
|
|
|
|
int
|
2017-12-04 04:43:30 +01:00
|
|
|
iswxdigit (wint_t c)
|
2002-09-20 22:13:11 +02:00
|
|
|
{
|
2018-03-09 13:30:33 +01:00
|
|
|
return (c >= (wint_t)'0' && c <= (wint_t)'9')
|
|
|
|
|| (c >= (wint_t)'a' && c <= (wint_t)'f')
|
|
|
|
|| (c >= (wint_t)'A' && c <= (wint_t)'F');
|
2002-09-20 22:13:11 +02:00
|
|
|
}
|