20#include <xrpl/basics/Blob.h> 
   21#include <xrpl/basics/StringUtilities.h> 
   22#include <xrpl/beast/core/LexicalCast.h> 
   23#include <xrpl/beast/net/IPEndpoint.h> 
   25#include <boost/algorithm/hex.hpp> 
   26#include <boost/algorithm/string/case_conv.hpp> 
   27#include <boost/algorithm/string/trim.hpp> 
   28#include <boost/regex/v5/regbase.hpp> 
   29#include <boost/regex/v5/regex.hpp> 
   30#include <boost/regex/v5/regex_fwd.hpp> 
   31#include <boost/regex/v5/regex_match.hpp> 
   59    static boost::regex reUrl(
 
   62        "([[:alpha:]][-+.[:alpha:][:digit:]]*?):" 
   67        "(?:([^:@/]*?)(?::([^@/]*?))?@)?" 
   69        "([[:digit:]:]*[[:digit:]]|\\[[^]]+\\]|[^:/?#]*?)" 
   71        "(?::([[:digit:]]+))?" 
   75    boost::smatch smMatch;
 
   80        if (!boost::regex_match(strUrl, smMatch, reUrl))
 
   89    boost::algorithm::to_lower(pUrl.
scheme);
 
   97    pUrl.
domain = result ? result->address().to_string() : domain;
 
  101        pUrl.
port = beast::lexicalCast<std::uint16_t>(port);
 
  110    pUrl.
path = smMatch[6];
 
 
  135    if (domain.
size() < 4 || domain.
size() > 128)
 
  142    static boost::regex 
const re(
 
  153        boost::regex_constants::optimize);
 
  155    return boost::regex_match(domain.
begin(), domain.
end(), re);
 
 
T back_inserter(T... args)
 
static std::optional< Endpoint > from_string_checked(std::string const &s)
Create an Endpoint from a string.
 
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::string trim_whitespace(std::string str)
 
std::optional< std::uint64_t > to_uint64(std::string const &s)
 
bool parseUrl(parsedURL &pUrl, std::string const &strUrl)
 
std::string sqlBlobLiteral(Blob const &blob)
Format arbitrary binary data as an SQLite "blob literal".
 
bool isProperlyFormedTomlDomain(std::string_view domain)
Determines if the given string looks like a TOML-file hosting domain.
 
std::optional< std::uint16_t > port