26 lines
818 B
C++
26 lines
818 B
C++
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
|
// Copyright (c) 2017-2023 The Zcash developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
|
|
|
/**
|
|
* Money parsing/formatting utilities.
|
|
*/
|
|
#ifndef BITCOIN_UTIL_MONEYSTR_H
|
|
#define BITCOIN_UTIL_MONEYSTR_H
|
|
|
|
#include <stdint.h>
|
|
#include <string>
|
|
|
|
#include "amount.h"
|
|
|
|
std::string FormatMoney(const CAmount& n);
|
|
/// Like `FormatMoney`, but meant to be human-readable, not parseable. E.g., it includes the
|
|
/// `CURRENCY_UNIT` in the result.
|
|
std::string DisplayMoney(const CAmount& n);
|
|
bool ParseMoney(const std::string& str, CAmount& nRet);
|
|
bool ParseMoney(const char* pszIn, CAmount& nRet);
|
|
|
|
#endif // BITCOIN_UTIL_MONEYSTR_H
|