Bitcoin
src
util
moneystr.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2018 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 <
amount.h
>
13
#include <
attributes.h
>
14
15
#include <cstdint>
16
#include <string>
17
18
/* Do not use these functions to represent or parse monetary amounts to or from
19
* JSON but use AmountFromValue and ValueFromAmount for that.
20
*/
21
std::string
FormatMoney
(
const
CAmount
& n);
22
NODISCARD
bool
ParseMoney
(
const
std::string& str,
CAmount
& nRet);
23
NODISCARD
bool
ParseMoney
(
const
char
* pszIn,
CAmount
& nRet);
24
25
#endif // BITCOIN_UTIL_MONEYSTR_H
attributes.h
CAmount
int64_t CAmount
Definition:
amount.h:12
NODISCARD
#define NODISCARD
Definition:
attributes.h:18
amount.h
ParseMoney
NODISCARD bool ParseMoney(const std::string &str, CAmount &nRet)
Definition:
moneystr.cpp:34
FormatMoney
std::string FormatMoney(const CAmount &n)
Definition:
moneystr.cpp:12
Generated by
1.8.15