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

Function normalize_string_handler

internal/cbm/extract_calls.c:1568–1578  ·  view source on GitHub ↗

Extract second argument name (handler ref for route registrations). Normalize a string-form route handler to a resolvable handler name. * 'showUsers' → showUsers * 'UserController@show' → show (Laravel "Controller@method") * The method segment after '@' is the resolvable function/method name. */

Source from the content-addressed store, hash-verified

1566 * 'UserController@show' → show (Laravel "Controller@method")
1567 * The method segment after '@' is the resolvable function/method name. */
1568static const char *normalize_string_handler(CBMArena *a, const char *raw) {
1569 const char *unq = strip_quotes(a, raw);
1570 if (!unq || !unq[0]) {
1571 return NULL;
1572 }
1573 const char *at = strchr(unq, '@');
1574 if (at && at[1]) {
1575 return cbm_arena_strdup(a, at + 1);
1576 }
1577 return unq;
1578}
1579
1580static const char *extract_handler_arg(CBMExtractCtx *ctx, TSNode args) {
1581 uint32_t nc = ts_node_named_child_count(args);

Callers 1

extract_handler_argFunction · 0.85

Calls 2

strip_quotesFunction · 0.70
cbm_arena_strdupFunction · 0.70

Tested by

no test coverage detected