mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Use std::string_view throughout util strencodings/string
This commit is contained in:
@@ -853,8 +853,8 @@ static bool GetConfigOptions(std::istream& stream, const std::string& filepath,
|
||||
error = strprintf("parse error on line %i: %s, options in configuration file must be specified without leading -", linenr, str);
|
||||
return false;
|
||||
} else if ((pos = str.find('=')) != std::string::npos) {
|
||||
std::string name = prefix + TrimString(str.substr(0, pos), pattern);
|
||||
std::string value = TrimString(str.substr(pos + 1), pattern);
|
||||
std::string name = prefix + TrimString(std::string_view{str}.substr(0, pos), pattern);
|
||||
std::string_view value = TrimStringView(std::string_view{str}.substr(pos + 1), pattern);
|
||||
if (used_hash && name.find("rpcpassword") != std::string::npos) {
|
||||
error = strprintf("parse error on line %i, using # in rpcpassword can be ambiguous and should be avoided", linenr);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user