[#BloombergLP-bdldfp-DecimalUtil-format-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::format
:relfileprefix: ../../../
:mrdocs:

Same as the related overload above for `format`&period;

== Synopsis

Declared in `&lt;bdldfp&lowbar;decimalutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
format(
    char* buffer,
    int length,
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] value,
    xref:BloombergLP/bdldfp/DecimalFormatConfig.adoc[DecimalFormatConfig] const& cfg = DecimalFormatConfig());
----

== Return Value

length of the formatted value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| buffer that receives the formatted characters
| *length*
| capacity of `buffer` in bytes
| *value*
| decimal value to format
| *cfg*
| optional formatting configuration
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
