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

Function cli_kebab_to_snake

src/cli/cli.c:4496–4502  ·  view source on GitHub ↗

Flag-name normalization: kebab-case CLI flags map to snake_case JSON keys * (--name-pattern -> name_pattern). In-place; buffer is NUL-terminated. */

Source from the content-addressed store, hash-verified

4494/* Flag-name normalization: kebab-case CLI flags map to snake_case JSON keys
4495 * (--name-pattern -> name_pattern). In-place; buffer is NUL-terminated. */
4496static void cli_kebab_to_snake(char *s) {
4497 for (; *s; s++) {
4498 if (*s == '-') {
4499 *s = '_';
4500 }
4501 }
4502}
4503
4504/* snake_case JSON key -> kebab-case flag name (for --help display). In-place. */
4505static void cli_snake_to_kebab(char *s) {

Callers 1

cbm_cli_build_args_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected