Bitcoin ABC  0.22.12
P2P Digital Currency
amount.cpp
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Copyright (c) 2017-2019 The Bitcoin developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #include <amount.h>
8 
9 #include <network.h>
10 
11 #include <tinyformat.h>
12 
13 std::string Amount::ToString() const {
14  return strprintf("%d.%08d %s", *this / COIN, (*this % COIN) / SATOSHI,
16 }
const std::string CURRENCY_UNIT
Definition: network.cpp:8
std::string ToString() const
Definition: amount.cpp:13
#define strprintf
Format arguments and return the string or write to given std::ostream (see tinyformat::format doc for...
Definition: tinyformat.h:1201
static constexpr Amount SATOSHI
Definition: amount.h:151
static constexpr Amount COIN
Definition: amount.h:153