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

Function normalize_string_handler

internal/cbm/extract_calls.c:2079–2089  ·  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

2077 * 'UserController@show' → show (Laravel "Controller@method")
2078 * The method segment after '@' is the resolvable function/method name. */
2079static const char *normalize_string_handler(CBMArena *a, const char *raw) {
2080 const char *unq = strip_quotes(a, raw);
2081 if (!unq || !unq[0]) {
2082 return NULL;
2083 }
2084 const char *at = strchr(unq, '@');
2085 if (at && at[1]) {
2086 return cbm_arena_strdup(a, at + 1);
2087 }
2088 return unq;
2089}
2090
2091static const char *extract_handler_arg(CBMExtractCtx *ctx, TSNode args) {
2092 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