mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
util: Move util/string.h functions to util namespace
There are no changes to behavior. Changes in this commit are all additions, and are easiest to review using "git diff -U0 --word-diff-regex=." options. Motivation for this change is to keep util functions with really generic names like "Split" and "Join" out of the global namespace so it is easier to see where these functions are defined, and so they don't interfere with function overloading, especially since the util library is a dependency of the kernel library and intended to be used with external code.
This commit is contained in:
@@ -45,6 +45,15 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
using namespace std::literals;
|
||||
using util::Join;
|
||||
using util::RemovePrefix;
|
||||
using util::RemovePrefixView;
|
||||
using util::ReplaceAll;
|
||||
using util::Split;
|
||||
using util::SplitString;
|
||||
using util::TrimString;
|
||||
using util::TrimStringView;
|
||||
|
||||
static const std::string STRING_WITH_EMBEDDED_NULL_CHAR{"1"s "\0" "1"s};
|
||||
|
||||
/* defined in logging.cpp */
|
||||
|
||||
Reference in New Issue
Block a user