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

Function EatSuffix

libs/base/string_utils.cpp:386–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386bool EatSuffix(std::string & s, std::string const & suffix)
387{
388 if (!s.ends_with(suffix))
389 return false;
390
391 CHECK_LESS_OR_EQUAL(suffix.size(), s.size(), ());
392 s = s.substr(0, s.size() - suffix.size());
393 return true;
394}
395
396std::string to_string_dac(double d, int dac)
397{

Callers 3

SearchByFeatureIdMethod · 0.85
UNIT_TESTFunction · 0.85
RemoveLastDotMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68