Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
moneystr.cpp File Reference
#include <util/moneystr.h>
#include <consensus/amount.h>
#include <tinyformat.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <cstdint>
#include <optional>
Include dependency graph for moneystr.cpp:

Go to the source code of this file.

Functions

std::string FormatMoney (const CAmount n)
 Money parsing/formatting utilities.
std::optional< CAmountParseMoney (const std::string &money_string)
 Parse an amount denoted in full coins.
bool ContainsNoNUL (std::string_view str) noexcept
 Check if a string does not contain any embedded NUL (\0) characters.
std::string TrimString (std::string_view str, std::string_view pattern=" \f\n\r\t\v")

Function Documentation

◆ ContainsNoNUL()

bool util::ContainsNoNUL ( std::string_view str)
inlinenodiscardnoexcept

Check if a string does not contain any embedded NUL (\0) characters.

Definition at line 234 of file string.h.

Here is the caller graph for this function:

◆ FormatMoney()

std::string FormatMoney ( const CAmount n)

Money parsing/formatting utilities.

Definition at line 19 of file moneystr.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseMoney()

std::optional< CAmount > ParseMoney ( const std::string & str)

Parse an amount denoted in full coins.

E.g. "0.0034" supplied on the command line.

Definition at line 45 of file moneystr.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TrimString()

std::string util::TrimString ( std::string_view str,
std::string_view pattern = " \f\n\r\t\v" )
inlinenodiscard

Definition at line 169 of file string.h.

Here is the caller graph for this function: