Checks if a string contains only hexadecimal digit (0-9, A-F) characters.
StringIsXDigit ( "string" )
As in other StringIs...() the check is stop if a Chr(0) is encountered inside the string.
Internally the C function is used to speed up the processing.
Valid characters are 0123456789abcdefABCDEF.
Note that a string containing whitespace or the "0x" prefix will cause StringIsXDigit() to return 0.
StringIsAlNum, StringIsAlpha, StringIsASCII, StringIsDigit, StringIsLower, StringIsSpace, StringIsUpper, StringLower, StringUpper
#include <MsgBoxConstants.au3>
MsgBox ($MB_SYSTEMMODAL,"","Is the string 42 a hexadecimal digit: "&StringIsXDigit ("42")&@CRLF &_; Returns 1, as the string contains only hexadecimal (0-9, A-F) characters.
"Is the string 00 a hexadecimal digit: "&StringIsXDigit ("00")&@CRLF &_; Returns 1, as the string contains only hexadecimal (0-9, A-F) characters.
"Is the string 1.0 a hexadecimal digit: "&StringIsXDigit ("1.0")&@CRLF &_; Returns 0, due to the decimal point.
"Is the number 1.0 a hexadecimal digit: "&StringIsXDigit (1.0)&@CRLF &_; Returns 1, due to the number to string conversion.
"Is the string 'A string' a hexadecimal digit: "&StringIsXDigit ("A string.")&@CRLF ); Returns 0, due to the string containing whitespace.