export * as TextBoundary from "./text-boundary.js"; /** * Clip text to a budget without ending or starting on half a character. `head` and `tail` count UTF-16 code units, * like `.length`; `utf8Tail` counts bytes of UTF-8 output that has not been decoded yet. The result can be shorter * than the budget by the part of the character at the cut, and `head("😀", 1)` is empty. Boundaries are code points, * not graphemes, and malformed input is kept as it is everywhere except at the cut. */ /** The first `limit` code units of `text`, without a high surrogate whose pair the limit cut off. */ export declare function head(text: string, limit: number): string; /** The last `limit` code units of `text`, without a low surrogate whose pair the limit cut off. */ export declare function tail(text: string, limit: number): string; /** The last `limit` bytes of `bytes`, decoded, after skipping up to 3 continuation bytes of a cut character. */ export declare function utf8Tail(bytes: Uint8Array, limit: number): string;