Rose::StringUtility::centerJustify
Center a string in a field.
Synopsis
Declared in <src/Rose/StringUtility/Convert.h>
[[visibility]]
std::string
centerJustify(
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 beginning and end of the string if necessary.
Return Value
Centered string.
Parameters
Name |
Description |
input |
Input string. |
width |
Target width. |
fill |
Fill character. |
Created with MrDocs