format overloads
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 value into buffer and return the formatted length.
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...
length of the formatted value
| Name | Description |
|---|---|
| buffer | buffer that receives the formatted characters |
| length | capacity of buffer in bytes |
| value | decimal value to format |
| cfg | optional formatting configuration |