MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / hexDigitValue

Function hexDigitValue

test/sqlite/speedtest1.c:86–91  ·  view source on GitHub ↗

** Return the value of a hexadecimal digit. Return -1 if the input ** is not a hex digit. */

Source from the content-addressed store, hash-verified

84** is not a hex digit.
85*/
86static int hexDigitValue(char c){
87 if( c>='0' && c<='9' ) return c - '0';
88 if( c>='a' && c<='f' ) return c - 'a' + 10;
89 if( c>='A' && c<='F' ) return c - 'A' + 10;
90 return -1;
91}
92
93/* Provide an alternative to sqlite3_stricmp() in older versions of
94** SQLite */

Callers 1

integerValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected