MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / UnHex

Function UnHex

extern/re2/re2/parse.cc:1435–1444  ·  view source on GitHub ↗

Convert hex digit to value.

Source from the content-addressed store, hash-verified

1433
1434// Convert hex digit to value.
1435static int UnHex(int c) {
1436 if ('0' <= c && c <= '9')
1437 return c - '0';
1438 if ('A' <= c && c <= 'F')
1439 return c - 'A' + 10;
1440 if ('a' <= c && c <= 'f')
1441 return c - 'a' + 10;
1442 LOG(DFATAL) << "Bad hex digit " << c;
1443 return 0;
1444}
1445
1446// Parse an escape sequence (e.g., \n, \{).
1447// Sets *s to span the remainder of the string.

Callers 1

ParseEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected