mirror of
https://github.com/GaryOderNichts/DRXUtil.git
synced 2024-10-31 22:55:09 +01:00
17 lines
269 B
C++
17 lines
269 B
C++
|
#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;
|
||
|
}
|
||
|
|
||
|
}
|