Skip to content

Rose::StringUtility::leftJustify

Left justify a string to specified width.

Synopsis

Declared in <src/Rose/StringUtility/Convert.h>

[[visibility("default")]]
std::string
leftJustify(
    std::string const& input,
    size_t width,
    char fill = ' ');

Description

The given string is either truncated or extended to make it the specified number of characters. New fill characters are added to the end of the string if necessary.

Return Value

Left-justified string.

Parameters

Name Description
input Input string.
width Target width.
fill Fill character.

Created with MrDocs