[#BloombergLP-bdldfp-DecimalImpUtil-format-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil.adoc[DecimalImpUtil]::format
:relfileprefix: ../../../
:mrdocs:

`format` overloads

== Synopses

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

Format the specified `value`, according to the parameters in the specified `cfg`&period; Place the output in the buffer designated by the specified `buffer` and `length`, and return the length of the formatted value&period; 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&period; This function does not write a terminating null character&period; If `length` is not positive, `buffer` is permitted to be null&period; This can be used to determine the necessary buffer size&period; See the  section for information on the configuration attributes&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/format-0e.adoc[_» more&period;&period;&period;_]#

Format the specified `ValueType64` using the specified configuration&period; Format the specified decimal `value` into `buffer`&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/format-08.adoc[_» more&period;&period;&period;_]#

Format the specified `value` into `buffer` using the specified `cfg`&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/format-0f.adoc[_» more&period;&period;&period;_]#


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