FormatParagraph

Format a paragraph of text to a fixed width, adding spaces for indentation to any added line.

Synopsis

Declared in <util/strencodings.h>

std::string
FormatParagraph(
    std::string_view in,
    size_t width = 79,
    size_t indent = 0);

Return Value

The reflowed paragraph.

Parameters

NameDescription
inThe text to format.
widthThe maximum line width in characters.
indentNumber of spaces to indent each wrapped line.