MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / ishex

Function ishex

tools/python-3.11.9-amd64/Lib/quopri.py:172–175  ·  view source on GitHub ↗

Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII.

(c)

Source from the content-addressed store, hash-verified

170
171# Other helper functions
172def ishex(c):
173 """Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII."""
174 assert isinstance(c, bytes)
175 return b'0' <= c <= b'9' or b'a' <= c <= b'f' or b'A' <= c <= b'F'
176
177def unhex(s):
178 """Get the integer value of a hexadecimal number."""

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected