MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / is_hex

Function is_hex

examples/server/httplib.h:1985–1997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1983namespace detail {
1984
1985inline bool is_hex(char c, int &v) {
1986 if (0x20 <= c && isdigit(c)) {
1987 v = c - '0';
1988 return true;
1989 } else if ('A' <= c && c <= 'F') {
1990 v = c - 'A' + 10;
1991 return true;
1992 } else if ('a' <= c && c <= 'f') {
1993 v = c - 'a' + 10;
1994 return true;
1995 }
1996 return false;
1997}
1998
1999inline bool from_hex_to_i(const std::string &s, size_t i, size_t cnt,
2000 int &val) {

Callers 1

from_hex_to_iFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected