MCPcopy Index your code
hub / github.com/RustPython/RustPython / unhex_nibble

Function unhex_nibble

crates/stdlib/src/binascii.rs:163–170  ·  view source on GitHub ↗
(c: u8)

Source from the content-addressed store, hash-verified

161 }
162
163 const fn unhex_nibble(c: u8) -> Option<u8> {
164 match c {
165 b'0'..=b'9' => Some(c - b'0'),
166 b'a'..=b'f' => Some(c - b'a' + 10),
167 b'A'..=b'F' => Some(c - b'A' + 10),
168 _ => None,
169 }
170 }
171
172 #[pyfunction(name = "a2b_hex")]
173 #[pyfunction]

Callers 2

unhexlifyFunction · 0.85
a2b_qpFunction · 0.85

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected