folly::format_value

Utilities for all format value specializations.

Functions

NameDescription
formatFormatter Format a Formatter object recursively. Behaves just like formatString(fmt.str(), arg, cb); but avoids creating a temporary string if possible.
formatNumber Format a number in "val"; the first prefixLen characters form the prefix (sign, "0x" base prefix, etc) which must be left-aligned if the alignment is Align::PAD_AFTER_SIGN. Treats Align::DEFAULT as Align::LEFT. Ignores arg.precision, as that has a different meaning for numbers (not "maximum field width")
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.