MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / FormatByte

Method FormatByte

tests/gtest/gtest-all.cc:3470–3475  ·  view source on GitHub ↗

Formats a byte as "%02X".

Source from the content-addressed store, hash-verified

3468
3469// Formats a byte as "%02X".
3470std::string String::FormatByte(unsigned char value) {
3471 std::stringstream ss;
3472 ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase
3473 << static_cast<unsigned int>(value);
3474 return ss.str();
3475}
3476
3477// Converts the buffer in a stringstream to an std::string, converting NUL
3478// bytes to "\\0" along the way.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected