[#BloombergLP-bdldfp-DecimalUtil-format-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::format :relfileprefix: ../../../ :mrdocs: `format` overloads == Synopses Declared in `<bdldfp_decimalutil.h>` Same as the related overload above for `format`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalUtil/format-05.adoc[format]( char* buffer, int length, xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] value, xref:BloombergLP/bdldfp/DecimalFormatConfig.adoc[DecimalFormatConfig] const& cfg = DecimalFormatConfig()); ---- [.small]#xref:BloombergLP/bdldfp/DecimalUtil/format-05.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalUtil/format-00.adoc[format]( char* buffer, int length, xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] value, xref:BloombergLP/bdldfp/DecimalFormatConfig.adoc[DecimalFormatConfig] const& cfg = DecimalFormatConfig()); ---- [.small]#xref:BloombergLP/bdldfp/DecimalUtil/format-00.adoc[_» more..._]# Same as the overload taking `Decimal32`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalUtil/format-0b.adoc[format]( char* buffer, int length, xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] value, xref:BloombergLP/bdldfp/DecimalFormatConfig.adoc[DecimalFormatConfig] const& cfg = DecimalFormatConfig()); ---- [.small]#xref:BloombergLP/bdldfp/DecimalUtil/format-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#