DRXUtil/source/Utils.cpp

17 lines
269 B
C++
Raw Normal View History

2024-04-02 17:51:50 +02:00
#include "Utils.hpp"
#include <cstring>
namespace Utils
{
std::string ToHexString(const void* data, size_t size)
{
std::string str;
for (size_t i = 0; i < size; ++i)
str += Utils::sprintf("%02x", ((const uint8_t*) data)[i]);
return str;
}
}