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

Function Func

src/util/spanparsing.cpp:23–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23bool Func(const std::string& str, Span<const char>& sp)
24{
25 if ((size_t)sp.size() >= str.size() + 2 && sp[str.size()] == '(' && sp[sp.size() - 1] == ')' && std::equal(str.begin(), str.end(), sp.begin())) {
26 sp = sp.subspan(str.size() + 1, sp.size() - str.size() - 2);
27 return true;
28 }
29 return false;
30}
31
32Span<const char> Expr(Span<const char>& sp)
33{

Callers 3

ParseScriptFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68