A reusable code-point↔UTF-16 offset map for one document.
Build it once per document and reuse it across that document's anchors; resolving N anchors with sliceByCodePoints instead costs a full scan per anchor.
sliceByCodePoints
Readonly
UTF-16 offset of each code point, with one extra entry for the end of the string.
A reusable code-point↔UTF-16 offset map for one document.
Build it once per document and reuse it across that document's anchors; resolving N anchors with
sliceByCodePointsinstead costs a full scan per anchor.