mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Replaces the usage of boost::string_view with std::string_view (#4509)
This commit is contained in:
committed by
GitHub
parent
06733ec21a
commit
825864032a
@@ -110,7 +110,7 @@ strUnHex(std::string const& strSrc)
|
||||
}
|
||||
|
||||
inline std::optional<Blob>
|
||||
strViewUnHex(boost::string_view const& strSrc)
|
||||
strViewUnHex(std::string_view strSrc)
|
||||
{
|
||||
return strUnHex(strSrc.size(), strSrc.cbegin(), strSrc.cend());
|
||||
}
|
||||
@@ -150,7 +150,7 @@ to_uint64(std::string const& s);
|
||||
doesn't check whether the TLD is valid.
|
||||
*/
|
||||
bool
|
||||
isProperlyFormedTomlDomain(std::string const& domain);
|
||||
isProperlyFormedTomlDomain(std::string_view domain);
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ base64_encode(std::string const& s)
|
||||
}
|
||||
|
||||
std::string
|
||||
base64_decode(std::string const& data);
|
||||
base64_decode(std::string_view data);
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ to_uint64(std::string const& s)
|
||||
}
|
||||
|
||||
bool
|
||||
isProperlyFormedTomlDomain(std::string const& domain)
|
||||
isProperlyFormedTomlDomain(std::string_view domain)
|
||||
{
|
||||
// The domain must be between 4 and 128 characters long
|
||||
if (domain.size() < 4 || domain.size() > 128)
|
||||
@@ -143,7 +143,7 @@ isProperlyFormedTomlDomain(std::string const& domain)
|
||||
,
|
||||
boost::regex_constants::optimize);
|
||||
|
||||
return boost::regex_match(domain, re);
|
||||
return boost::regex_match(domain.begin(), domain.end(), re);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
@@ -242,7 +242,7 @@ base64_encode(std::uint8_t const* data, std::size_t len)
|
||||
}
|
||||
|
||||
std::string
|
||||
base64_decode(std::string const& data)
|
||||
base64_decode(std::string_view data)
|
||||
{
|
||||
std::string dest;
|
||||
dest.resize(base64::decoded_size(data.size()));
|
||||
|
||||
Reference in New Issue
Block a user