MCPcopy Create free account
hub / github.com/davisking/dlib / has_ending

Function has_ending

tools/python/src/numpy_returns.cpp:37–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37bool has_ending (std::string const full_string, std::string const &ending) {
38 if(full_string.length() >= ending.length()) {
39 return (0 == full_string.compare(full_string.length() - ending.length(), ending.length(), ending));
40 } else {
41 return false;
42 }
43}
44
45// ----------------------------------------------------------------------------------------
46

Callers 1

save_imageFunction · 0.85

Calls 2

lengthMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected