canvaskit-wasm 0.39
build 2026-04-29
URange
A half-open UTF-16 code-unit range: [start, end). start is inclusive, end is exclusive. Used by paragraph hit-testing and word/line boundary APIs to describe substrings of the original text.
const r = { start: 0, end: 5 }; // covers code units 0..4 (5 chars)
The half-open convention matches String.prototype.slice(start, end). Distinct from Range (closed first/last).
Fields
| Field | Type | Notes |
|---|---|---|
start | number | Inclusive UTF-16 code-unit index. |
end | number | Exclusive UTF-16 code-unit index. |
See also
Range— closed integer range (paragraph runs).