(offset: number)
| 1503 | } |
| 1504 | |
| 1505 | prevOffset(offset: number): number { |
| 1506 | if (offset <= 0) return 0 |
| 1507 | |
| 1508 | return this.withCache(`prev:${offset}`, () => { |
| 1509 | const boundaries = this.getGraphemeBoundaries() |
| 1510 | return this.binarySearchBoundary(boundaries, offset, false) |
| 1511 | }) |
| 1512 | } |
| 1513 | |
| 1514 | /** |
| 1515 | * Snap an arbitrary code-unit offset to the start of the containing grapheme. |
no test coverage detected