folly::format_value::formatString

Format a string in "val", obeying appropriate alignment, padding, width, and precision. Treats Align::DEFAULT as Align::LEFT, and Align::PAD_AFTER_SIGN as Align::RIGHT; use formatNumber for number-specific formatting.

Synopsis

Declared in <folly/Format.h>

template<class FormatCallback>
void
formatString(
    StringPiece val,
    FormatArg& arg,
    FormatCallback& cb);

Parameters

NameDescription
valThe string value to format.
argThe format argument describing alignment, padding, and width.
cbThe callback that receives the formatted output.