MCPcopy Create free account
hub / github.com/SmingHub/Sming / unhex

Function unhex

Sming/System/stringutil.cpp:76–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76signed char unhex(char c)
77{
78 if(c >= '0' && c <= '9') {
79 return (char)(c - '0');
80 }
81 if(c >= 'a' && c <= 'f') {
82 return (char)(10 + c - 'a');
83 }
84 if(c >= 'A' && c <= 'F') {
85 return (char)(10 + c - 'A');
86 }
87 return -1;
88}

Callers 3

readHexValueMethod · 0.50
decodeHexBlockMethod · 0.50
MacAddressMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected