This commit is contained in:
Nav
2024-12-14 02:09:39 +00:00
parent 2580cecb26
commit 87ffc10306
3 changed files with 4 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ namespace Services
return stream.str();
}
std::string StringService::toHex(const std::vector<unsigned char>& data) {
std::string StringService::toHex(std::span<const unsigned char> data) {
auto stream = std::stringstream{};
stream << std::hex << std::setfill('0');

View File

@@ -3,6 +3,7 @@
#include <string>
#include <string_view>
#include <cstdint>
#include <span>
#include <vector>
#include <type_traits>
#include <utility>
@@ -25,7 +26,7 @@ namespace Services
static std::string toHex(std::uint32_t value);
static std::string toHex(std::uint16_t value);
static std::string toHex(unsigned char value);
static std::string toHex(const std::vector<unsigned char>& data);
static std::string toHex(std::span<const unsigned char> data);
static std::string toHex(std::string_view data);
template <typename Type>