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());

Format value into buffer and return the formatted length.

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

Same as the overload taking Decimal32.

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

Return Value

length of the formatted value

Parameters

Name

Description

buffer

buffer that receives the formatted characters

length

capacity of buffer in bytes

value

decimal value to format

cfg

optional formatting configuration

Created with MrDocs