(name: string)
| 155 | * identically. A name with no template args passes through unchanged. |
| 156 | */ |
| 157 | export function stripCppTemplateArgs(name: string): string { |
| 158 | if (!name.includes('<')) return name; |
| 159 | let out = ''; |
| 160 | let depth = 0; |
| 161 | for (const ch of name) { |
| 162 | if (ch === '<') depth++; |
| 163 | else if (ch === '>') { if (depth > 0) depth--; } |
| 164 | else if (depth === 0) out += ch; |
| 165 | } |
| 166 | return out.trim(); |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * A function/method's return type lives in the `function_definition`'s `type` |
no outgoing calls
no test coverage detected