previousGraphemeStart
function previousGraphemeStart(text, offset): number;Defined in: helpers.ts:114
Start offset of the grapheme cluster ending at offset (i.e. the extent a
Backspace should remove). Grapheme-aware so a native emoji — surrogate pair
or ZWJ sequence — is deleted whole. Falls back to surrogate-pair handling
when Intl.Segmenter is unavailable.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text | string |
offset | number |
Returns
Section titled “Returns”number