(input: string, separator: string, excludeRanges: TextRange[])
| 150 | } |
| 151 | |
| 152 | export function splitExcluding(input: string, separator: string, excludeRanges: TextRange[]): string[] { |
| 153 | const parts: string[] = []; |
| 154 | let commaIndex = -1; |
| 155 | let currIndex = 0; |
| 156 | while ((commaIndex = indexOfExcluding(input, separator, currIndex, excludeRanges)) >= 0) { |
| 157 | parts.push(input.substring(currIndex, commaIndex).trim()); |
| 158 | currIndex = commaIndex + 1; |
| 159 | } |
| 160 | parts.push(input.substring(currIndex).trim()); |
| 161 | return parts; |
| 162 | } |
no test coverage detected