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

Function stripCppTemplateArgs

src/extraction/languages/c-cpp.ts:513–523  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

511 * identically. A name with no template args passes through unchanged.
512 */
513export function stripCppTemplateArgs(name: string): string {
514 if (!name.includes('<')) return name;
515 let out = '';
516 let depth = 0;
517 for (const ch of name) {
518 if (ch === '<') depth++;
519 else if (ch === '>') { if (depth > 0) depth--; }
520 else if (depth === 0) out += ch;
521 }
522 return out.trim();
523}
524
525
526/**

Callers 10

extractCallMethod · 0.90
recordCppFnPtrBindingMethod · 0.90
extractInheritanceMethod · 0.90
cppDefinitionHeadsFunction · 0.90
extraction.test.tsFile · 0.90
cMemberTypeNamesFunction · 0.85
collectCTypeNamesFunction · 0.85
cppWrittenClassPartsFunction · 0.85
extractCppReceiverTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected