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

Function span_ends_with_ci

internal/cbm/service_patterns.c:806–822  ·  view source on GitHub ↗

Case-insensitive "text ends with suffix" over [text, text + len). */

Source from the content-addressed store, hash-verified

804
805/* Case-insensitive "text ends with suffix" over [text, text + len). */
806static bool span_ends_with_ci(const char *text, size_t len, const char *suffix) {
807 size_t sl = strlen(suffix);
808 if (len < sl) {
809 return false;
810 }
811 const char *tail = text + (len - sl);
812 for (size_t i = 0; i < sl; i++) {
813 char a = tail[i];
814 if (a >= 'A' && a <= 'Z') {
815 a = (char)(a - 'A' + 'a');
816 }
817 if (a != suffix[i]) {
818 return false;
819 }
820 }
821 return true;
822}
823
824bool cbm_service_pattern_is_client_navigation(bool js_family, const char *callee_name) {
825 if (!js_family || !callee_name || !callee_name[0]) {

Calls

no outgoing calls

Tested by

no test coverage detected