add some helpful hex dump overloads

custom
jacqueline 9 months ago
parent be9564d1c7
commit 4210a8ac54
  1. 9
      src/util/include/debug.hpp

@ -6,6 +6,7 @@
#pragma once #pragma once
#include <cstdint>
#include <iomanip> #include <iomanip>
#include <ostream> #include <ostream>
#include <span> #include <span>
@ -43,4 +44,12 @@ inline std::string format_hex_string(std::span<const std::byte> data) {
return oss.str(); return oss.str();
} }
inline std::string format_hex_string(std::span<const uint8_t> data) {
return format_hex_string(std::as_bytes(data));
}
inline std::string format_hex_string(std::span<const char> data) {
return format_hex_string(std::as_bytes(data));
}
} // namespace util } // namespace util

Loading…
Cancel
Save