If anyone needs something to check for valid hex digits you can use regular expressions also, like this using the POSIX character class for hex instead of doing the [a-fA-F0-9] thing:
Code: Select all
Procedure IsHex(in_str.s)
rex_ishex = CreateRegularExpression(#PB_Any,"^[[:xdigit:]]+$")
is_hex.b = MatchRegularExpression(rex_ishex, in_str)
FreeRegularExpression(rex_ishex)
ProcedureReturn is_hex
EndProcedure
; returns #True (1) if character is valid hex, #False (0) if not

