BloombergLP::bdlb::Print

Provide a namespace for the interface to a suite of procedural stream operations.

Synopsis

Declared in <bdlb_print.h>

struct Print;

Static Member Functions

NameDescription
hexDump hexDump overloads
indent Emit to the specified output stream the number of spaces ( ) equal to the absolute value of the product of the specified level and spacesPerLevel or, if level is negative, nothing at all. Return a reference providing modifiable access to stream. The behavior is undefined unless the absolute value of the product of the specified level and spacesPerLevel is representable as int.
newlineAndIndent Emit to the specified stream a newline (` `) followed by the number of spaces ( ) equal to the absolute value of the product of the specified level and spacesPerLevel or, if spacesPerLevel is negative, emit a single space (and no newline). Return a reference providing modifiable access to stream. The behavior is undefined unless the absolute value of the product of the specified level and spacesPerLevel is representable as int.
printPtr Print to the specified stream the specified pointer value in a standard format. The output is in hexadecimal format with a maximum length of 2 * sizeof(void *). The output does not have leading zeros and is not preceded by 0x. The hexadecimal digits (a to f, inclusive) are expressed in lower case.
printString Print to the specified stream the specified string of the specified length and return a reference providing modifiable access to stream. If the optionally specified escapeBackSlash flag is true, then all occurrences of the backslash character ('') in the string are escaped (i.e., expanded to "\") when written to the stream. Note that non-printable characters in string will be printed in their hexadecimal representation ('xHH'). If stream is not valid on entry, this operation has no effect. The behavior is undefined unless 0 <= length.
singleLineHexDump singleLineHexDump overloads