isxdigit
Проверяет, является ли элемент в языковом стандарте знак, используемый для представления шестнадцатеричное число.
template<Class CharType>
bool isxdigit(
CharType _Ch,
const locale& _Loc
)
Параметры
_Ch
Элемент, который требуется проверить._Loc
Языковой стандарт, содержащую элемент, который требуется проверить.
Возвращаемое значение
true если элемент проверянный знак, используемый для представления шестнадцатеричное число. false если объект отсутствует.
Заметки
Функция возвращает > шаблона > CharType<ctype< use_facet(_Loc). (>::xdigit, _ChCharType<ctype).
Шестнадцатеричные числа с основанием 16 используется для представления чисел с помощью букв a по f 0 до 9 без учета добавочные обращение- для представления десятичные числа от 0 до 15.
Пример
// locale_isxdigit.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
using namespace std;
int main( )
{
locale loc ( "German_Germany" );
bool result1 = isxdigit ( '5', loc );
bool result2 = isxdigit ( 'd', loc );
bool result3 = isxdigit ( 'q', loc );
if ( result1 )
cout << "The character '5' in the locale is "
<< "a hexidecimal digit-character." << endl;
else
cout << "The character '5' in the locale is "
<< " not a hexidecimal digit-character." << endl;
if ( result2 )
cout << "The character 'd' in the locale is "
<< "a hexidecimal digit-character." << endl;
else
cout << "The character 'd' in the locale is "
<< " not a hexidecimal digit-character." << endl;
if ( result3 )
cout << "The character 'q' in the locale is "
<< "a hexidecimal digit-character." << endl;
else
cout << "The character 'q' in the locale is "
<< " not a hexidecimal digit-character." << endl;
}
Output
The character '5' in the locale is a hexidecimal digit-character.
The character 'd' in the locale is a hexidecimal digit-character.
The character 'q' in the locale is not a hexidecimal digit-character.
Требования
заголовок: <locale>
std пространство имен: