(path, prefix)
| 69 | const translationExtensionName = "vscode-cpptools"; |
| 70 | |
| 71 | function removePathPrefix(path, prefix) { |
| 72 | if (!prefix) { |
| 73 | return path; |
| 74 | } |
| 75 | if (!path.startsWith(prefix)) { |
| 76 | return path; |
| 77 | } |
| 78 | if (path === prefix) { |
| 79 | return ""; |
| 80 | } |
| 81 | let ch = prefix.charAt(prefix.length - 1); |
| 82 | if (ch === '/' || ch === '\\') { |
| 83 | return path.substring(prefix.length); |
| 84 | } |
| 85 | ch = path.charAt(prefix.length); |
| 86 | if (ch === '/' || ch === '\\') { |
| 87 | return path.substring(prefix.length + 1); |
| 88 | } |
| 89 | return path; |
| 90 | } |
| 91 | |
| 92 | const dataLocIdAttribute = "data-loc-id"; |
| 93 | const dataLocHintAttribute = "data-loc-hint"; |
no outgoing calls
no test coverage detected