MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Const

Function Const

src/script/descriptor.cpp:377–384  ·  view source on GitHub ↗

Parse a constant. If succesful, sp is updated to skip the constant and return true. */

Source from the content-addressed store, hash-verified

375
376/** Parse a constant. If succesful, sp is updated to skip the constant and return true. */
377bool Const(const std::string& str, Span<const char>& sp)
378{
379 if ((size_t)sp.size() >= str.size() && std::equal(str.begin(), str.end(), sp.begin())) {
380 sp = sp.subspan(str.size());
381 return true;
382 }
383 return false;
384}
385
386/** Parse a function call. If succesful, sp is updated to be the function's argument(s). */
387bool Func(const std::string& str, Span<const char>& sp)

Callers 1

ParseScriptFunction · 0.85

Calls 4

subspanMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected