File: util.h

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (14 lines) | stat: -rw-r--r-- 275 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <string>

template <typename T>
static std::string Hex(const T &id_item)
{
  char buf[T::kSize * 2];
  id_item.ToLowerBase16(buf);
  return std::string(buf, sizeof(buf));
}