Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
moneystr.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2015 The Bitcoin Core developers
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
9#ifndef BITCOIN_UTIL_MONEYSTR_H
10#define BITCOIN_UTIL_MONEYSTR_H
11
12#include <string>
13
14struct Amount;
15
20std::string FormatMoney(const Amount n);
25[[nodiscard]] bool ParseMoney(const std::string &str, Amount &nRet);
26
27#endif // BITCOIN_UTIL_MONEYSTR_H
bool ParseMoney(const std::string &str, Amount &nRet)
Parse an amount denoted in full coins.
Definition moneystr.cpp:37
std::string FormatMoney(const Amount n)
Do not use these functions to represent or parse monetary amounts to or from JSON but use AmountFromV...
Definition moneystr.cpp:13
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85