BloombergLP::bdldfp::DecimalUtil::format

format overloads

Synopses

Declared in <bdldfp_decimalutil.h>

Same as the related overload above for format.

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

Format the specified value, placing the output in the buffer designated by the specified buffer and length, and return the length of the formatted value. If there is insufficient room in the buffer, its contents will be left in an unspecified state, with the returned value indicating the necessary size. This function does not write a terminating null character. If length is not positive, buffer is permitted to be null. This can be used to determine the necessary buffer size. Optionally specify a cfg, indicating formatting parameters. If cfg is not specified, then default configuration instance, indicating scientific notation style with a precision sufficient to produce all available digits is used. See the section for information on the configuration attributes.

static
int
format(
    char* buffer,
    int length,
    Decimal32 value,
    DecimalFormatConfig const& cfg = DecimalFormatConfig());
» more...

Same as the overload taking Decimal32.

static
int
format(
    char* buffer,
    int length,
    Decimal64 value,
    DecimalFormatConfig const& cfg = DecimalFormatConfig());
» more...