5#include <blockfilter.h>
73 (void)
Join(random_string_vector, random_string_1);
83 }
catch (
const std::runtime_error&) {
87 }
catch (
const std::runtime_error&) {
101 (void)
TrimString(random_string_1, random_string_2);
106 }
catch (
const std::runtime_error&) {
113 data_stream << random_string_1;
115 data_stream >> limited_string;
116 assert(data_stream.empty());
117 assert(
s.size() <= random_string_1.size());
119 if (!random_string_1.empty()) {
122 }
catch (
const std::ios_base::failure&) {
128 data_stream << limited_string;
129 std::string deserialized_string;
130 data_stream >> deserialized_string;
131 assert(data_stream.empty());
132 assert(deserialized_string == random_string_1);
140 assert(single_split.size() >= 1);
141 const auto any_split{
SplitString(random_string_1, random_string_2)};
142 assert(any_split.size() >= 1);
std::string HelpMessageGroup(const std::string &message)
Format a string to be used as group of options in help messages.
std::string HelpMessageOpt(const std::string &option, const std::string &message)
Format a string to be used as option description in help messages.
bool BlockFilterTypeByName(const std::string &name, BlockFilterType &filter_type)
Find a filter type by its human-readable name.
Double ended buffer combining vector and stream-like interfaces.
std::string ConsumeRandomLengthString(size_t max_length)
T ConsumeIntegralInRange(T min, T max)
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert positional arguments to command-specific RPC representation.
UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert named arguments to command-specific RPC representation.
std::string CopyrightHolders(const std::string &strPrefix)
std::string FormatSubVersion(const std::string &name, int nClientVersion, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip...
std::string ShellEscape(const std::string &arg)
is a home for simple string functions returning descriptive messages that are used in RPC and GUI int...
bool FeeModeFromString(const std::string &mode_string, FeeEstimateMode &fee_estimate_mode)
bilingual_str AmountErrMsg(const std::string &optname, const std::string &strValue)
bilingual_str ResolveErrMsg(const std::string &optname, const std::string &strBind)
bool OnlyHasDefaultSectionSetting(const Settings &settings, const std::string §ion, const std::string &name)
Return true if a setting is set in the default config file section, and not overridden by a higher pr...
bilingual_str AmountHighWarn(const std::string &optname)
std::vector< std::string > SplitString(std::string_view str, char sep)
std::string TrimString(std::string_view str, std::string_view pattern=" \f\n\r\t\v")
std::string RemovePrefix(std::string_view str, std::string_view prefix)
auto Join(const C &container, const S &separator, UnaryOp unary_op)
Join all container items.
bool ContainsNoNUL(std::string_view str) noexcept
Check if a string does not contain any embedded NUL (\0) characters.
enum Network ParseNetwork(const std::string &net_in)
std::optional< OutputType > ParseOutputType(const std::string &type)
UniValue JSONRPCError(int code, const std::string &message)
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
std::string GetDescriptorChecksum(const std::string &descriptor)
Get the checksum for a descriptor.
#define LIMITED_STRING(obj, n)
bool IsDeprecatedRPCEnabled(const std::string &method)
bool TimingResistantEqual(const T &a, const T &b)
Timing-attack-resistant comparison.
std::vector< std::string > ConsumeRandomLengthStringVector(FuzzedDataProvider &fuzzed_data_provider, const size_t max_vector_size=16, const size_t max_string_length=16) noexcept
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
std::string UrlDecode(std::string_view url_encoded)
std::string Capitalize(std::string str)
Capitalizes the first character of the given string.
std::string ToUpper(std::string_view str)
Returns the uppercase equivalent of the given string.
bool ParseFixedPoint(std::string_view val, int decimals, int64_t *amount_out)
Parse number as fixed point according to JSON number syntax.
std::string FormatParagraph(std::string_view in, size_t width, size_t indent)
Format a paragraph of text to a fixed width, adding spaces for indentation to any added line.
bool SplitHostPort(std::string_view in, uint16_t &portOut, std::string &hostOut)
Splits socket address string into host string and port value.
std::string ToLower(std::string_view str)
Returns the lowercase equivalent of the given string.
std::string SanitizeString(std::string_view str, int rule)
Remove unsafe chars.