|
QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
|
Small, dependency free helpers which the rest of the library reaches for. More...
Classes | |
| class | quickcpplib::_xxx::algorithm::hamming_ecc::hamming_ecc< blocksize > |
| Calculates the single error correcting Hamming Error Correcting Code for a blocksize block of bytes. For example, a hamming_ecc<8> would be the very common 72,64 Hamming code used in ECC RAM, or a hamming_ecc<4096> would be for a 32784,32768 Hamming code. More... | |
Functions | |
| template<class CharType, class T, typename std::enable_if<(sizeof(T)==1), bool >::type = true, typename std::enable_if<(std::is_trivially_copyable< T >::value), bool >::type = true, typename std::enable_if<(!std::is_const< CharType >::value), bool >::type = true> | |
| size_t | quickcpplib::_xxx::algorithm::string::to_hex_string (CharType *out, size_t outlen, const T *_in, size_t inlen) |
| Converts a number to a hex string. Out buffer can be same as in buffer. | |
| template<class T, class CharType, typename std::enable_if<(sizeof(T)==1), bool >::type = true, typename std::enable_if<(std::is_trivially_copyable< T >::value), bool >::type = true, typename std::enable_if<(!std::is_const< T >::value), bool >::type = true> | |
| size_t | quickcpplib::_xxx::algorithm::string::from_hex_string (T *out, size_t outlen, const CharType *in, size_t inlen) |
| Converts a hex string to a number. Out buffer can be same as in buffer. | |
Small, dependency free helpers which the rest of the library reaches for.
They are grouped here by what they are rather than by where they live, because several parts of the library and its tests use them: number to hex string encoding and the case conversions below, the Hamming ECC in hamming_ecc.hpp, and so on. (Three \ingroup utils elsewhere in the library used to point at a group nobody defined, which doxygen 1.9 accepted silently and doxygen 1.10 and later report as "Found non-existing group 'utils'", failing the documentation build.)
|
inline |
Converts a number to a hex string. Out buffer can be same as in buffer.
Note that the character range used is a 16 item table of:
0123456789abcdef
This lets one pack one byte of input into two bytes of output.
|
inline |
Converts a hex string to a number. Out buffer can be same as in buffer.
Note that this routine is about 43% slower than to_hex_string(), half of which is due to input validation.