iswxdigit() in C++

iswxdigit(): This function is available in the file ctype.h.  This function checks whether a character is a hexadecimal digit character or not. This function returns a value different from zero (i.e. true) if a wide character is a hexadecimal digit. Zero (i.e. false) otherwise.

Note: hexadecimal digit is any of: 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F

Parameters: One parameter is required for this function.

arg: A wide character to be checked, cast into wint_t.

Syntax:

int iswxdigit(wint_t _C)

iswxdigit(arg)

For Exaxmple:

iswxdigit(L'a')  = > It returns true (any non-zero value).

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    wint_t C = L'a';

    cout << iswxdigit(C<< "\n";

    return 0;
}


No comments:

Post a Comment