7 if( c >=
'0' && c <=
'9' )
9 if( c >=
'a' && c <=
'f' )
11 if( c >=
'A' && c <=
'F' )
20 const char*
to_hex=
"0123456789abcdef";
28 fc::string::const_iterator i = hex_str.begin();
30 uint8_t* out_end = out_pos + out_data_len;
31 while( i != hex_str.end() && out_end != out_pos ) {
34 if( i != hex_str.end() ) {
40 return out_pos - (
uint8_t*)out_data;
42 std::string
to_hex(
const std::vector<char>& data )
45 return to_hex( data.data(), data.size() );
Used to generate a useful error report when an exception is thrown.
Defines exception's used by fc.
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
fc::string to_hex(const char *d, uint32_t s)