Parse str as a decimal floating‐point number into out.

Synopsis

Declared in <bdldfp_decimalutil.h>

template<class STRING_TYPE>
static
int
parseDecimal128(
    Decimal128* out,
    STRING_TYPE const& str);

Description

Load into the specified out the decimal floating point number described by the specified str; return zero if the conversion was successful and non‐zero otherwise. The value of out is unspecified if the function returns a non‐zero value. The parameterized STRING_TYPE must be one of bsl::string, std::string, std::pmr::string (if supported), or bslstl::StringRef.

Return Value

0 on success and non‐zero otherwise

Parameters

Name

Description

out

receives the parsed value

str

decimal text to parse

Created with MrDocs