(input: string, search: string, position: number, excludeRanges: TextRange[])
| 141 | } |
| 142 | |
| 143 | function indexOfExcluding(input: string, search: string, position: number, excludeRanges: TextRange[]) { |
| 144 | const i = input.indexOf(search, position); |
| 145 | const exclusion = excludeRanges.find((r) => i >= r.start && i < r.end); |
| 146 | if (exclusion) { |
| 147 | return indexOfExcluding(input, search, exclusion.end, excludeRanges); |
| 148 | } |
| 149 | return i; |
| 150 | } |
| 151 | |
| 152 | export function splitExcluding(input: string, separator: string, excludeRanges: TextRange[]): string[] { |
| 153 | const parts: string[] = []; |
no outgoing calls
no test coverage detected