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

Function binChar

src/jrd/SysFunction.cpp:3650–3666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3648}
3649
3650UCHAR binChar(UCHAR c, unsigned p)
3651{
3652 if ('0' <= c && c <= '9')
3653 return c - '0';
3654
3655 if ('A' <= c && c <= 'F')
3656 return c + 10 - 'A';
3657
3658 if ('a' <= c && c <= 'f')
3659 return c + 10 - 'a';
3660
3661 char s[2];
3662 s[0] = c;
3663 s[1] = 0;
3664 (Arg::Gds(isc_invalid_hex_digit) << s << Arg::Num(p + 1)).raise();
3665 return 0; // warning silencer
3666}
3667
3668dsc* evlEncodeDecodeHex(thread_db* tdbb, bool encodeFlag, const SysFunction* function, const NestValueArray& args, impure_value* impure)
3669{

Callers 1

evlEncodeDecodeHexFunction · 0.85

Calls 3

GdsClass · 0.85
NumClass · 0.85
raiseMethod · 0.45

Tested by

no test coverage detected