mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-03-06 02:56:09 +00:00
adds a line when no copyright for Dogecoin Core Developers exists but the file has been edited by us, to the last year found in git log, or extends the year range on an existing line when a file has been modified since the year previously listed. Excludes subtrees.
23 lines
597 B
C++
23 lines
597 B
C++
// Copyright (c) 2019 The Bitcoin Core developers
|
|
// Copyright (c) 2022 The Dogecoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_UTIL_STRING_H
|
|
#define BITCOIN_UTIL_STRING_H
|
|
|
|
#include "attributes.h"
|
|
|
|
#include <cstring>
|
|
#include <string>
|
|
|
|
/**
|
|
* Check if a string does not contain any embedded NUL (\0) characters
|
|
*/
|
|
NODISCARD inline bool ValidAsCString(const std::string& str) noexcept
|
|
{
|
|
return str.size() == strlen(str.c_str());
|
|
}
|
|
|
|
#endif // BITCOIN_UTIL_STRING_H
|