MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / hexdigit

Function hexdigit

crates/cpp/src/symbol_name.rs:3–9  ·  view source on GitHub ↗
(v: u32)

Source from the content-addressed store, hash-verified

1use wit_bindgen_core::abi;
2
3fn hexdigit(v: u32) -> char {
4 if v < 10 {
5 char::from_u32(('0' as u32) + v).unwrap()
6 } else {
7 char::from_u32(('A' as u32) - 10 + v).unwrap()
8 }
9}
10
11/// encode symbol as alphanumeric by hex-encoding special characters
12pub fn make_external_component(input: &str) -> String {

Callers 1

make_external_componentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected