3#include <xrpl/basics/Blob.h>
5#include <boost/utility/string_view.hpp>
36concept SomeChar = std::same_as<std::remove_cvref_t<T>, int8_t> ||
37 std::same_as<std::remove_cvref_t<T>,
char> || std::same_as<std::remove_cvref_t<T>, uint8_t>;
42 for (
int i = 0; i < 10; ++i)
45 for (
int i = 0; i < 6; ++i)
62template <
class Iterator>
78 out.
push_back(
static_cast<unsigned char>(*c));
85 if (!cHigh.has_value())
90 if (!cLow.has_value())
93 out.
push_back(
static_cast<unsigned char>((*cHigh << 4) | *cLow));
96 return {std::move(out)};
std::optional< int > hexCharToInt(SomeChar auto hexChar)
constexpr std::array< std::optional< int >, 256 > const kDigitLookupTable
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string toLower(std::string str)
Fold ASCII upper case letters to lower case.
bool isProperlyFormedTomlDomain(std::string_view domain)
Determines if the given string looks like a TOML-file hosting domain.
std::string trimWhitespace(std::string str)
Remove leading and trailing ASCII whitespace.
std::optional< Blob > strUnHex(std::size_t strSize, Iterator begin, Iterator end)
std::optional< std::uint64_t > toUInt64(std::string const &s)
std::string sqlBlobLiteral(Blob const &blob)
Format arbitrary binary data as an SQLite "blob literal".
std::vector< unsigned char > Blob
Storage for linear binary data.
bool parseUrl(ParsedUrl &pUrl, std::string const &strUrl)
bool operator==(ParsedUrl const &other) const
std::optional< std::uint16_t > port