(candidate, candidateSpan, pattern, ignoreCase, patternSpan)
| 142568 | : ts.compareValues(a.kind, b.kind) || ts.compareBooleans(!a.isCaseSensitive, !b.isCaseSensitive); |
| 142569 | } |
| 142570 | function partStartsWith(candidate, candidateSpan, pattern, ignoreCase, patternSpan) { |
| 142571 | if (patternSpan === void 0) { patternSpan = { start: 0, length: pattern.length }; } |
| 142572 | return patternSpan.length <= candidateSpan.length // If pattern part is longer than the candidate part there can never be a match. |
| 142573 | && everyInRange(0, patternSpan.length, function (i) { return equalChars(pattern.charCodeAt(patternSpan.start + i), candidate.charCodeAt(candidateSpan.start + i), ignoreCase); }); |
| 142574 | } |
| 142575 | function equalChars(ch1, ch2, ignoreCase) { |
| 142576 | return ignoreCase ? toLowerCase(ch1) === toLowerCase(ch2) : ch1 === ch2; |
| 142577 | } |
no test coverage detected