Decode a decimal value in the multi‐width encoding format from the specified buffer having the specified size and store the result into the specified decimal parameter. Return 0 on success, and non‐zero value otherwise. 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.
Synopsis
Declared in <bdldfp_decimalconvertutil.h>
static
int
decimal64FromMultiWidthEncodingIfValid(
Decimal64* decimal,
unsigned char const* buffer,
bsls::Types::size_type size);
Created with MrDocs