Make SanitizeString use string_view

This commit is contained in:
Pieter Wuille
2022-04-04 11:23:03 -04:00
committed by MacroFake
parent 963bc9b576
commit d648b5120b
2 changed files with 8 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ enum class ByteUnit : uint64_t {
* @param[in] rule The set of safe chars to choose (default: least restrictive)
* @return A new string without unsafe chars
*/
std::string SanitizeString(const std::string& str, int rule = SAFE_CHARS_DEFAULT);
std::string SanitizeString(std::string_view str, int rule = SAFE_CHARS_DEFAULT);
std::vector<unsigned char> ParseHex(std::string_view str);
signed char HexDigit(char c);
/* Returns true if each character in str is a hex character, and has an even