MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / EndsWith

Function EndsWith

src/benchmark/Performance.cpp:77–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool EndsWith(const std::string& value, const std::string& suffix) {
78 return value.size() >= suffix.size() &&
79 value.compare(value.size() - suffix.size(), suffix.size(), suffix) == 0;
80}
81
82std::string ReplaceSuffix(const std::string& value, const std::string& from,
83 const std::string& to) {

Callers 2

ReplaceSuffixFunction · 0.70
RewriteDictNodeFunction · 0.70

Calls 2

sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected