26 #ifndef INCLUDE_OLA_STRINGS_FORMAT_H_ 27 #define INCLUDE_OLA_STRINGS_FORMAT_H_ 69 return _ToHex<T>(v, (std::numeric_limits<T>::digits / HEX_BIT_WIDTH), prefix);
76 std::ostream& operator<<(std::ostream &out, const ola::strings::_ToHex<T> &i) {
77 std::ios::fmtflags flags(out.flags());
83 out << std::setw(i.width) << std::hex << std::setfill(
'0')
84 << ola::strings::_HexCast(i.value);
104 unsigned int indent = 0,
105 unsigned int byte_per_line = 8);
108 #endif // INCLUDE_OLA_STRINGS_FORMAT_H_ Definition: FormatPrivate.h:46
void FormatData(std::ostream *out, const uint8_t *data, unsigned int length, unsigned int indent, unsigned int byte_per_line)
Write binary data to an ostream in a human readable form.
Definition: Format.cpp:46
_ToHex< T > ToHex(T v, bool prefix=true)
Convert a value to a hex string.
Definition: Format.h:68
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
string IntToString(int i)
Convert an int to a string.
Definition: Format.cpp:34