24#ifndef MYSQL_STRCONV_FORMATS_HEX_FORMAT_H
25#define MYSQL_STRCONV_FORMATS_HEX_FORMAT_H
43 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
44 '8',
'9',
'a',
'b',
'c',
'd',
'e',
'f'};
48 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
49 '8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
64template <Hex_parse_case hex_parse_case_tp>
80 static std::array<int, 256>
table;
83 for (
int i = 0; i != 256; ++i)
table[i] = -1;
122template <Hex_case hex_case_tp = Hex_case::lower>
131 assert(half_byte >= 0);
132 assert(half_byte < 16);
142 assert(hex_char >= 0);
143 assert(hex_char < 256);
Return a conversion table with 256 elements, where elements for hex chars is the corresponding intege...
Definition: hex_format.h:65
static auto & build_table()
Fill and return the conversion table.
Definition: hex_format.h:78
static auto & table()
Return the table.
Definition: hex_format.h:68
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: gtid_binary_format_conv.h:252
static constexpr std::array< unsigned char, 16 > int_to_hex_lower
Conversion table with 16 elements, where element i is lowercase hex for i.
Definition: hex_format.h:42
static constexpr std::array< unsigned char, 16 > int_to_hex_upper
Conversion table with 16 elements, where element i is uppercase hex i.
Definition: hex_format.h:47
Hex_parse_case
Policy for using uppercase/lowercase when parsing hex.
Definition: hex_format.h:53
@ upper
Accept only uppercase.
@ flexible
Accept lowercase or uppercase.
@ lower
Accept only lowercase.
Definition: gtid_binary_format.h:41
Hex_case
Policy for using uppercase/lowercase in hex conversion.
Definition: hex_format.h:105