MCPcopy Create free account
hub / github.com/apache/kvrocks / EndsWith

Function EndsWith

src/common/string_util.cc:112–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112bool EndsWith(std::string_view str, std::string_view suffix) {
113 return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
114}
115bool EndsWithICase(std::string_view str, std::string_view suffix) {
116 return str.size() >= suffix.size() && EqualICase(str.substr(str.size() - suffix.size()), suffix);
117}

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68