Appends precision number of bytes of v to the format sink.

Synopsis

Declared in <absl/strings/str_format.h>

bool
PutPaddedString(
    std::string_view v,
    int width,
    int precision,
    bool left);

Description

If this is less than width, spaces will be appended first (if left is false), or after (if left is true) to ensure the total amount appended is at least width.

Return Value

true on success.

Parameters

Name

Description

v

The characters to append.

width

The minimum number of bytes to append.

precision

The number of bytes of v to append.

left

Whether padding is added after (true) or before (false).

Created with MrDocs