26 #ifndef INCLUDE_OLA_STRINGS_FORMAT_H_
27 #define INCLUDE_OLA_STRINGS_FORMAT_H_
68 _ToHex<T> ToHex(T v,
bool prefix =
true) {
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_
std::string IntToString(int i)
Convert an int to a string.
Definition: StringUtils.h:121
void FormatData(std::ostream *out, const uint8_t *data, unsigned int length, unsigned int indent=0, unsigned int byte_per_line=8)
Write binary data to an ostream in a human readable form.
Definition: StringUtils.h:468
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44