util: move spanparsing.h Split functions to string.h

This will help move the miniscript / descriptor parsing functions out of the
util library in an upcoming commit, so they are not exposed to libbitcoinkernel
applications. Moving the Split functions should also make them more
discoverable since they now close to related functions like Join.

The functions are moved verbatim without any changes.
This commit is contained in:
Ryan Ofsky
2023-12-06 15:37:49 -05:00
parent 23cc8ddff4
commit 6dd2ad4792
3 changed files with 46 additions and 40 deletions

View File

@@ -7,6 +7,7 @@
#include <script/sign.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <boost/test/unit_test.hpp>
@@ -400,7 +401,6 @@ void CheckInferDescriptor(const std::string& script_hex, const std::string& expe
provider.pubkeys.emplace(origin_pubkey.GetID(), origin_pubkey);
if (!origin_str.empty()) {
using namespace spanparsing;
KeyOriginInfo info;
Span<const char> origin_sp{origin_str};
std::vector<Span<const char>> origin_split = Split(origin_sp, "/");