Replaces the usage of boost::string_view with std::string_view (#4509)

This commit is contained in:
Chenna Keshava B S
2024-06-17 13:41:03 -07:00
committed by GitHub
parent 06733ec21a
commit 825864032a
24 changed files with 132 additions and 91 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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()));