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

Function RemovePrefix

src/util/string.h:29–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29[[nodiscard]] inline std::string RemovePrefix(const std::string& str, const std::string& prefix)
30{
31 if (str.substr(0, prefix.size()) == prefix) {
32 return str.substr(prefix.size());
33 }
34 return str;
35}
36
37/**
38 * Join a list of items

Callers 3

LogPrintStrMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68