[#BloombergLP-bdldfp-DecimalConvertUtil-decimal64FromMultiWidthEncodingIfValid]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalConvertUtil.adoc[DecimalConvertUtil]::decimal64FromMultiWidthEncodingIfValid
:relfileprefix: ../../../
:mrdocs:

Decode a decimal value in the _multi&hyphen;width encoding_ format from the specified `buffer` having the specified `size` and store the result into the specified `decimal` parameter&period; Return 0 on success, and non&hyphen;zero value otherwise&period; The behavior is undefined unless `buffer` has at least `size` bytes&period; Note that this function returns a non&hyphen;zero value and leaves `decimal` unchanged if `size` is not a valid encoding size of the _multi&hyphen;width encoding_ format&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
decimal64FromMultiWidthEncodingIfValid(
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]* decimal,
    unsigned char const* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size);
----


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