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

Method contains

KittyMemoryEx/KittyUtils.cpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 }
158
159 bool String::contains(const std::string &str, const std::string &substring, bool sensitive)
160 {
161 if (str.length() < substring.length())
162 return false;
163 if (sensitive)
164 {
165 return str.find(substring) != std::string::npos;
166 }
167 auto it = std::search(str.begin(), str.end(), substring.begin(), substring.end(), charEqualsIgnoreCase);
168 return it != str.end();
169 }
170
171 bool String::endsWith(const std::string &str, const std::string &suffix, bool sensitive)
172 {

Callers

nothing calls this directly

Calls 1

endMethod · 0.80

Tested by

no test coverage detected