(str, index)
| 14366 | return matrix[bLength][aLength] |
| 14367 | } |
| 14368 | static getLineIndexAtCharacterPosition(str, index) { |
| 14369 | const lines = str.split("\n") |
| 14370 | const len = lines.length |
| 14371 | let position = 0 |
| 14372 | for (let lineNumber = 0; lineNumber < len; lineNumber++) { |
| 14373 | position += lines[lineNumber].length |
| 14374 | if (position >= index) return lineNumber |
| 14375 | } |
| 14376 | } |
| 14377 | static resolvePath(filePath, programFilepath) { |
| 14378 | // For use in Node.js only |
| 14379 | if (!filePath.startsWith(".")) return filePath |