[#BloombergLP-bdldfp-DecimalConvertUtil-decimal64FromMultiWidthEncodingIfValid] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalConvertUtil.adoc[DecimalConvertUtil]::decimal64FromMultiWidthEncodingIfValid :relfileprefix: ../../../ :mrdocs: Decode a multi‐width value from `buffer` if `size` is valid. == Synopsis Declared in `<bdldfp_decimalconvertutil.h>` [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_type] size); ---- == Description The behavior is undefined unless `buffer` has at least `size` bytes. Note that this function returns a non‐zero value and leaves `decimal` unchanged if `size` is not a valid encoding size of the _multi‐width encoding_ format. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *decimal* | receives the decoded value on success | *buffer* | buffer containing a multi‐width encoding | *size* | number of encoded bytes to read |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#