MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ends_with

Function ends_with

src/pipeline/pass_pkgmap.c:185–192  ·  view source on GitHub ↗

Check if a string ends with a suffix. */

Source from the content-addressed store, hash-verified

183
184/* Check if a string ends with a suffix. */
185static bool ends_with(const char *s, const char *suffix) {
186 size_t slen = strlen(s);
187 size_t suflen = strlen(suffix);
188 if (suflen > slen) {
189 return false;
190 }
191 return strcmp(s + slen - suflen, suffix) == 0;
192}
193
194/* Find a line starting with a prefix in source. Returns pointer to first char
195 * after prefix, or NULL. Handles leading whitespace. */

Callers 2

cbm_pkgmap_try_parseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected