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

Function ends_with

src/pipeline/pass_pkgmap.c:189–196  ·  view source on GitHub ↗

Check if a string ends with a suffix. */

Source from the content-addressed store, hash-verified

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

Callers 3

cbm_pkgmap_try_parseFunction · 0.70
resolve_exact_file_nodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected