MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / hexdigit2int

Function hexdigit2int

deps/lua/src/lua_cjson.c:739–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737 json_token_t *token);
738
739static int hexdigit2int(char hex)
740{
741 if ('0' <= hex && hex <= '9')
742 return hex - '0';
743
744 /* Force lowercase */
745 hex |= 0x20;
746 if ('a' <= hex && hex <= 'f')
747 return 10 + hex - 'a';
748
749 return -1;
750}
751
752static int decode_hex4(const char *hex)
753{

Callers 1

decode_hex4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected