MCPcopy Create free account
hub / github.com/ElementsProject/elements / Split

Function Split

src/util/spanparsing.cpp:51–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::vector<Span<const char>> Split(const Span<const char>& sp, char sep)
52{
53 std::vector<Span<const char>> ret;
54 auto it = sp.begin();
55 auto start = it;
56 while (it != sp.end()) {
57 if (*it == sep) {
58 ret.emplace_back(start, it);
59 start = it + 1;
60 }
61 ++it;
62 }
63 ret.emplace_back(start, it);
64 return ret;
65}
66
67} // namespace spanparsing

Callers 6

ParsePubkeyInnerFunction · 0.50
ParsePubkeyFunction · 0.50
CheckChecksumFunction · 0.50
BOOST_AUTO_TEST_CASEFunction · 0.50
FUZZ_TARGETFunction · 0.50

Calls 3

emplace_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.40
FUZZ_TARGETFunction · 0.40