MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / placeholder

Function placeholder

src/extraction/languages/objcpp.ts:176–180  ·  view source on GitHub ↗

`(0 … )` of the length of `text`, a bracketed expression, its line breaks kept.

(text: string)

Source from the content-addressed store, hash-verified

174
175/** `(0 … )` of the length of `text`, a bracketed expression, its line breaks kept. */
176function placeholder(text: string): string {
177 const inner = spaces(text.slice(1, -1));
178 const at = inner.search(/ /);
179 return at < 0 ? `(${inner})` : `(${inner.slice(0, at)}0${inner.slice(at + 1)})`;
180}
181
182/** The end of the preprocessor line that starts at `i`, through `\` continuations and comments. */
183function directiveEnd(source: string, i: number): number {

Callers 1

splitObjcppFunction · 0.85

Calls 2

spacesFunction · 0.85
searchMethod · 0.80

Tested by

no test coverage detected