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

Function camel_should_split

src/store/store.c:454–468  ·  view source on GitHub ↗

True if we should insert a space BEFORE input[i] to split a camelCase word * boundary (lowercase→uppercase or uppercase-run→uppercase-then-lowercase). */

Source from the content-addressed store, hash-verified

452/* True if we should insert a space BEFORE input[i] to split a camelCase word
453 * boundary (lowercase→uppercase or uppercase-run→uppercase-then-lowercase). */
454static bool camel_should_split(const char *input, int i) {
455 if (i <= 0) {
456 return false;
457 }
458 char curr = input[i];
459 char prev = input[i - SKIP_ONE];
460 char next = input[i + SKIP_ONE];
461 if (curr >= 'A' && curr <= 'Z' && prev >= 'a' && prev <= 'z') {
462 return true;
463 }
464 if (curr >= 'A' && curr <= 'Z' && prev >= 'A' && prev <= 'Z' && next >= 'a' && next <= 'z') {
465 return true;
466 }
467 return false;
468}
469
470static void sqlite_camel_split(sqlite3_context *ctx, int argc, sqlite3_value **argv) {
471 (void)argc;

Callers 1

sqlite_camel_splitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected