/** * Surrogate-pair-aware UTF-16 boundary snaps. Port of transponder's * text-boundary.mjs. Never cut between a high surrogate (U+D800–U+DBFF) and * its low pair (U+DC00–U+DFFF). Sufficient to keep well-formed UTF-16; not a * full grapheme-cluster segmenter (Intl.Segmenter would be heavier for these * hot tail paths). */ /** * Snap an inclusive start index left so `s.slice(start)` never begins on a * lone low surrogate. Prefer including the full pair over dropping a fragment. */ export declare function snapStartInclusive(s: string, start: number): number; /** * Tail slice of at most `cap` UTF-16 units, never starting mid-pair. * May keep `cap+1` when the cut would split a surrogate pair (include the high). */ export declare function sliceTailSafe(s: string, cap: number): string;