10USERVER_NAMESPACE_BEGIN
12namespace utils::encoding {
24 return LengthInHexForm(data.size());
47void ToHex(std::string_view input, std::string& out)
noexcept;
51inline std::string
ToHex(std::string_view data)
noexcept {
60inline std::string
ToHex(
const void* encoded, size_t len)
noexcept {
61 const auto* chars =
reinterpret_cast<
const char*>(encoded);
62 return ToHex(std::string_view{chars, len});
80inline std::string
FromHex(std::string_view encoded)
noexcept {
82 FromHex(encoded, result);
99 return ToHex(&value,
sizeof(value));