MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / endsWith

Method endsWith

KittyMemoryEx/KittyUtils.cpp:171–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 }
170
171 bool String::endsWith(const std::string &str, const std::string &suffix, bool sensitive)
172 {
173 if (str.length() < suffix.length())
174 return false;
175 if (sensitive)
176 {
177 return str.compare(str.length() - suffix.length(), suffix.length(), suffix) == 0;
178 }
179 return std::equal(suffix.rbegin(), suffix.rend(), str.rbegin(), charEqualsIgnoreCase);
180 }
181
182 bool String::startsWith(const std::string &str, const std::vector<std::string> &prefixes, bool sensitive)
183 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected