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

Function platform_token_eq

internal/cbm/helpers.c:1898–1914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1896 "loongarch", "loongarch64", NULL};
1897
1898static bool platform_token_eq(const char *s, size_t len) {
1899 for (int i = 0; platform_tokens[i]; i++) {
1900 const char *t = platform_tokens[i];
1901 size_t tl = strlen(t);
1902 if (tl != len) {
1903 continue;
1904 }
1905 size_t k = 0;
1906 while (k < len && tolower((unsigned char)s[k]) == t[k]) {
1907 k++;
1908 }
1909 if (k == len) {
1910 return true;
1911 }
1912 }
1913 return false;
1914}
1915
1916/* Length of `stem` without a trailing `_<token>` / `-<token>` / `.<token>`
1917 * platform suffix (the longest one), or `len` when it has none. */

Callers 2

platform_stem_lenFunction · 0.85
cbm_platform_neutral_qnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected