MCPcopy Index your code
hub / github.com/github/copilot-sdk / toSnakeCase

Function toSnakeCase

scripts/codegen/rust.ts:128–135  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

126}
127
128function toSnakeCase(s: string): string {
129 return s
130 .replace(/([A-Z])/g, "_$1")
131 .replace(/^_/, "")
132 .replace(/[.\-\s]+/g, "_")
133 .toLowerCase()
134 .replace(/_+/g, "_");
135}
136
137/** Convert a JSON property name (camelCase) to a Rust field name (snake_case). */
138function toRustFieldName(jsonName: string): string {

Callers 3

toRustFieldNameFunction · 0.70
emitNamespaceStructFunction · 0.70
emitNamespaceMethodFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…