MCPcopy Create free account
hub / github.com/axmolengine/axmol / hexdigit2int

Function hexdigit2int

3rdparty/lua/lua-cjson/lua_cjson.c:767–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765 json_token_t *token);
766
767static int hexdigit2int(char hex)
768{
769 if ('0' <= hex && hex <= '9')
770 return hex - '0';
771
772 /* Force lowercase */
773 hex |= 0x20;
774 if ('a' <= hex && hex <= 'f')
775 return 10 + hex - 'a';
776
777 return -1;
778}
779
780static int decode_hex4(const char *hex)
781{

Callers 1

decode_hex4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected