BloombergLP::bdldfp::DecimalUtil::format

Same as the related overload above for format.

Synopsis

Declared in <bdldfp_decimalutil.h>

static
int
format(
    char* buffer,
    int length,
    Decimal128 value,
    DecimalFormatConfig const& cfg = DecimalFormatConfig());

Return Value

length of the formatted value

Parameters

NameDescription
bufferbuffer that receives the formatted characters
lengthcapacity of buffer in bytes
valuedecimal value to format
cfgoptional formatting configuration