BloombergLP::bdlb::Print::indent

Emit indentation spaces to the specified stream.

Synopsis

Declared in <bdlb_print.h>

static
std::ostream&
indent(
    std::ostream& stream,
    int level,
    int spacesPerLevel = 4);

Description

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.

Return Value

a reference to stream

Parameters

NameDescription
streamthe output stream
levelthe indentation level
spacesPerLevelspaces per indentation level