util.h 275 B

1234567891011121314
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. #pragma once
  4. #include <string>
  5. template <typename T>
  6. static std::string Hex(const T &id_item)
  7. {
  8. char buf[T::kSize * 2];
  9. id_item.ToLowerBase16(buf);
  10. return std::string(buf, sizeof(buf));
  11. }