Pad string on the right with padChar up to length.

Synopses

Declared in <bdlb_string.h>

Pad string on the right with padChar up to length.

static
void
pad(
    bsl::string* string,
    int length,
    char padChar = ' ');

Pad string on the right with padChar up to length.

static
void
pad(
    std::pmr::string* string,
    std::pmr::string::size_type length,
    char padChar = ' ');

Pad string on the right with padChar up to length.

static
void
pad(
    std::string* string,
    int length,
    char padChar = ' ');

Parameters

Name

Description

string

string to pad

length

desired length after padding

padChar

character used for padding (default space)

Created with MrDocs