BloombergLP::bdldfp::DecimalUtil::parseDecimal128

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.

Synopsis

Declared in <bdldfp_decimalutil.h>

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