Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII.
(c)
| 163 | |
| 164 | # Other helper functions |
| 165 | def ishex(c): |
| 166 | """Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII.""" |
| 167 | assert isinstance(c, bytes) |
| 168 | return b'0' <= c <= b'9' or b'a' <= c <= b'f' or b'A' <= c <= b'F' |
| 169 | |
| 170 | def unhex(s): |
| 171 | """Get the integer value of a hexadecimal number.""" |
no outgoing calls
no test coverage detected
searching dependent graphs…