Handbook
Glossary
hex-digit? ( ch -- ? )
Vocabulary
hex-strings
Inputs
ch
a character
Outputs
?
a
boolean
Word description
Checks if a digit is in hexadecimal format, e.g. a-f A-F and 0-9
Examples
USING: hex-strings prettyprint ; CHAR: a hex-digit? .
t
USING: hex-strings prettyprint ; CHAR: z hex-digit? .
f
Definition
USING:
combinators.short-circuit
math.order
;
IN:
hex-strings
:
hex-digit?
( ch -- ? )
{
[
65 70
between?
]
[
97 102
between?
]
[
48 57
between?
]
}
1||
;