(name: string)
| 100 | * identically. A name with no template args passes through unchanged. |
| 101 | */ |
| 102 | export function stripCppTemplateArgs(name: string): string { |
| 103 | if (!name.includes('<')) return name; |
| 104 | let out = ''; |
| 105 | let depth = 0; |
| 106 | for (const ch of name) { |
| 107 | if (ch === '<') depth++; |
| 108 | else if (ch === '>') { if (depth > 0) depth--; } |
| 109 | else if (depth === 0) out += ch; |
| 110 | } |
| 111 | return out.trim(); |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * A function/method's return type lives in the `function_definition`'s `type` |
no outgoing calls
no test coverage detected