MCPcopy Create free account
hub / github.com/IBM/ACE-RISCV / decode_hex

Function decode_hex

tools/cove_tap_tool/src/main.rs:73–78  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

71}
72
73pub fn decode_hex(s: &str) -> Result<Vec<u8>, core::num::ParseIntError> {
74 (0..s.len())
75 .step_by(2)
76 .map(|i| u8::from_str_radix(&s[i..i + 2], 16))
77 .collect()
78}
79
80fn main() -> Result<(), Error> {
81 Ok(match Args::parse().cmd {

Callers 1

parse_key_valFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected