MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / ends_with

Function ends_with

examples/benchmark.cpp:94–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static bool ends_with(const std::string & s, const std::string & suffix) {
95 if (suffix.size() > s.size()) return false;
96 return s.compare(s.size() - suffix.size(), suffix.size(), suffix) == 0;
97}
98
99static std::string strip_extension(const std::string & filename) {
100 auto pos = filename.rfind('.');

Callers 1

discover_modelsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected