BloombergLP::bdlb::Print::hexDump

Print a buffer in hexadecimal format to a stream.

Synopsis

Declared in <bdlb_print.h>

static
std::ostream&
hexDump(
    std::ostream& stream,
    char const* buffer,
    int length);

Description

Print in hexadecimal format the contents of the specified buffer of the specified length to the specified stream, and return a reference providing modifiable access to stream. The behavior is undefined unless 0 <= length.

Return Value

a reference to stream

Parameters

NameDescription
streamthe output stream
bufferthe memory buffer to dump
lengththe length of buffer in bytes