MCPcopy Create free account
hub / github.com/defold/defold / hexdigit2int

Function hexdigit2int

engine/script/src/luacjson/lua_cjson.c:1020–1031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018 json_token_t *token);
1019
1020static int hexdigit2int(char hex)
1021{
1022 if ('0' <= hex && hex <= '9')
1023 return hex - '0';
1024
1025 /* Force lowercase */
1026 hex |= 0x20;
1027 if ('a' <= hex && hex <= 'f')
1028 return 10 + hex - 'a';
1029
1030 return -1;
1031}
1032
1033static int decode_hex4(const char *hex)
1034{

Callers 1

decode_hex4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected