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