MCPcopy Create free account
hub / github.com/GJDuck/e9patch / hasSuffix

Function hasSuffix

src/e9tool/e9misc.cpp:77–82  ·  view source on GitHub ↗

* Check for suffix. */

Source from the content-addressed store, hash-verified

75 * Check for suffix.
76 */
77bool hasSuffix(const std::string &str, const char *suffix)
78{
79 size_t len = strlen(suffix);
80 return (str.size() < len? false: str.compare(str.size()-len,
81 len, suffix, len) == 0);
82}
83
84/*
85 * Get the absolute source filename.

Callers 2

openPluginFunction · 0.85
main_2Function · 0.85

Calls 3

compareMethod · 0.80
strlenFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected