#include "utils.h"

#include <iostream>
#include <sstream>
#include <iomanip>

std::string utils::hexToString(int value)
{
    std::ostringstream ss;
    ss << std::hex << std::setw(2) << std::setfill('0') << value;
    return ss.str();
}

std::string utils::hexToStringWithPrefix(int value)
{
    std::ostringstream ss;
    ss << "0x" << std::hex << std::setw(2) << std::setfill('0') << std::uppercase << value;
    return ss.str();
}
