MCPcopy Create free account
hub / github.com/asmuth/clip / endsWith

Method endsWith

src/utils/stringutil.cc:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212
213
214bool StringUtil::endsWith(const std::string& str, const std::string& suffix) {
215 if (str.length() < suffix.length()) {
216 return false;
217 }
218
219 return str.compare(
220 str.length() - suffix.length(),
221 suffix.length(),
222 suffix) == 0;
223}
224
225int StringUtil::compare(
226 const char* s1,

Callers

nothing calls this directly

Calls 1

compareMethod · 0.80

Tested by

no test coverage detected