ParseMoney

Parse an amount denoted in full coins. E.g. "0.0034" supplied on the command line.

Synopsis

Declared in <util/moneystr.h>

std::optional<CAmount>
ParseMoney(std::string const& str);

Return Value

The parsed amount in the smallest unit, or std::nullopt if invalid.

Parameters

NameDescription
strThe string to parse.