MCPcopy Create free account
hub / github.com/comaps/comaps / EatPrefix

Function EatPrefix

libs/base/string_utils.cpp:376–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376bool EatPrefix(std::string & s, std::string const & prefix)
377{
378 if (!s.starts_with(prefix))
379 return false;
380
381 CHECK_LESS_OR_EQUAL(prefix.size(), s.size(), ());
382 s = s.substr(prefix.size());
383 return true;
384}
385
386bool EatSuffix(std::string & s, std::string const & suffix)
387{

Callers 3

EatMwmNameFunction · 0.85
SearchByFeatureIdMethod · 0.85
UNIT_TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68