Hexadecimal decoder which satisfy SliceTranscoder concept.
More...
#include <mdbx.h++>
|
MDBX_CXX11_CONSTEXPR | from_hex (const slice &source, bool ignore_spaces=false) noexcept |
|
template<class ALLOCATOR = legacy_allocator> |
string< ALLOCATOR > | as_string (const ALLOCATOR &allocator=ALLOCATOR()) const |
| Decodes hexadecimal dump from a passed slice to returned string. More...
|
|
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy> |
buffer< ALLOCATOR, CAPACITY_POLICY > | as_buffer (const ALLOCATOR &allocator=ALLOCATOR()) const |
| Decodes hexadecimal dump from a passed slice to returned buffer. More...
|
|
MDBX_CXX11_CONSTEXPR size_t | envisage_result_length () const noexcept |
| Returns the number of bytes needed for conversion hexadecimal dump from a passed slice to decoded data. More...
|
|
char * | write_bytes (char *dest, size_t dest_size) const |
| Fills the destination with data decoded from hexadecimal dump from a passed slice. More...
|
|
bool | is_empty () const noexcept |
| Checks whether a passed slice is empty, and therefore there will be no output bytes. More...
|
|
bool | is_erroneous () const noexcept |
| Checks whether the content of a passed slice is a valid hexadecimal dump, and therefore there could be decoded or not. More...
|
|
Hexadecimal decoder which satisfy SliceTranscoder concept.
◆ from_hex()
◆ as_buffer()
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer<ALLOCATOR, CAPACITY_POLICY> mdbx::from_hex::as_buffer |
( |
const ALLOCATOR & |
allocator = ALLOCATOR() | ) |
const |
|
inline |
Decodes hexadecimal dump from a passed slice to returned buffer.
◆ as_string()
template<class ALLOCATOR = legacy_allocator>
string<ALLOCATOR> mdbx::from_hex::as_string |
( |
const ALLOCATOR & |
allocator = ALLOCATOR() | ) |
const |
|
inline |
Decodes hexadecimal dump from a passed slice to returned string.
◆ envisage_result_length()
Returns the number of bytes needed for conversion hexadecimal dump from a passed slice to decoded data.
◆ is_empty()
bool mdbx::from_hex::is_empty |
( |
| ) |
const |
|
inlinenoexcept |
Checks whether a passed slice is empty, and therefore there will be no output bytes.
◆ is_erroneous()
bool mdbx::from_hex::is_erroneous |
( |
| ) |
const |
|
noexcept |
Checks whether the content of a passed slice is a valid hexadecimal dump, and therefore there could be decoded or not.
◆ write_bytes()
char* mdbx::from_hex::write_bytes |
( |
char * |
dest, |
|
|
size_t |
dest_size |
|
) |
| const |
Fills the destination with data decoded from hexadecimal dump from a passed slice.
- Exceptions
-
std::length_error | if given buffer is too small. |
◆ ignore_spaces
const bool mdbx::from_hex::ignore_spaces = false |
◆ source
const slice mdbx::from_hex::source |
The documentation for this struct was generated from the following file: