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

Function cbm_str_ends_with

src/foundation/str_util.c:136–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136bool cbm_str_ends_with(const char *s, const char *suffix) {
137 if (!s || !suffix) {
138 return false;
139 }
140 size_t slen = strlen(s);
141 size_t xlen = strlen(suffix);
142 if (xlen > slen) {
143 return false;
144 }
145 return strcmp(s + slen - xlen, suffix) == 0;
146}
147
148bool cbm_str_contains(const char *s, const char *sub) {
149 if (!s || !sub) {

Callers 1

test_str_util.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected