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

Function camel_should_split

src/store/store.c:790–804  ·  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

788/* True if we should insert a space BEFORE input[i] to split a camelCase word
789 * boundary (lowercase→uppercase or uppercase-run→uppercase-then-lowercase). */
790static bool camel_should_split(const char *input, int i) {
791 if (i <= 0) {
792 return false;
793 }
794 char curr = input[i];
795 char prev = input[i - SKIP_ONE];
796 char next = input[i + SKIP_ONE];
797 if (curr >= 'A' && curr <= 'Z' && prev >= 'a' && prev <= 'z') {
798 return true;
799 }
800 if (curr >= 'A' && curr <= 'Z' && prev >= 'A' && prev <= 'Z' && next >= 'a' && next <= 'z') {
801 return true;
802 }
803 return false;
804}
805
806static void sqlite_camel_split(sqlite3_context *ctx, int argc, sqlite3_value **argv) {
807 (void)argc;

Callers 1

sqlite_camel_splitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected