pub fn money_from_str(currency: &str, s: &str) -> Result<MoneyValue, MoneyError>Expand description
Parses a decimal text into a MoneyValue of the given currency.
§Errors
§Examples
use brokapi_tbank_protocol::money::money_from_str;
let m = money_from_str("rub", "1500.50")?;
assert_eq!((m.units, m.nano), (1500, 500_000_000));