mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
scripted-diff: Rename ValidAsCString to ContainsNoNUL
-BEGIN VERIFY SCRIPT- sed -i 's,ValidAsCString,ContainsNoNUL,g' $(git grep -l ValidAsCString) -END VERIFY SCRIPT-
This commit is contained in:
@@ -40,7 +40,7 @@ std::string FormatMoney(const CAmount n)
|
||||
|
||||
std::optional<CAmount> ParseMoney(const std::string& money_string)
|
||||
{
|
||||
if (!ValidAsCString(money_string)) {
|
||||
if (!ContainsNoNUL(money_string)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
const std::string str = TrimString(money_string);
|
||||
|
||||
@@ -91,7 +91,7 @@ inline std::string MakeUnorderedList(const std::vector<std::string>& items)
|
||||
/**
|
||||
* Check if a string does not contain any embedded NUL (\0) characters
|
||||
*/
|
||||
[[nodiscard]] inline bool ValidAsCString(std::string_view str) noexcept
|
||||
[[nodiscard]] inline bool ContainsNoNUL(std::string_view str) noexcept
|
||||
{
|
||||
for (auto c : str) {
|
||||
if (c == 0) return false;
|
||||
|
||||
Reference in New Issue
Block a user