* Given that candidate matches pattern, returns the text matching the '*'. * E.g.: matchedText(tryParsePattern("foo*baz"), "foobarbaz") === "bar"
(pattern, candidate)
| 2393 | * E.g.: matchedText(tryParsePattern("foo*baz"), "foobarbaz") === "bar" |
| 2394 | */ |
| 2395 | function matchedText(pattern, candidate) { |
| 2396 | ts.Debug.assert(isPatternMatch(pattern, candidate)); |
| 2397 | return candidate.substring(pattern.prefix.length, candidate.length - pattern.suffix.length); |
| 2398 | } |
| 2399 | ts.matchedText = matchedText; |
| 2400 | /** Return the object corresponding to the best pattern to match `candidate`. */ |
| 2401 | function findBestPatternMatch(values, getPattern, candidate) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…