export declare const TAB_WIDTH = 8; /** * How many terminal columns the character at `cp` occupies. * * Mirrors what glibc's `wcwidth` reports to GNU `wc -L`: 2 for an East Asian * wide or fullwidth character, 0 for a combining mark, a Hangul jamo medial * or final, or one of the zero-width format characters, and 1 for everything * else. A control character measures 0, which is how `wc` accounts for * `wcwidth`'s -1; callers handle tab, newline, carriage return and form feed * themselves, since those move the cursor rather than occupy a column. * * Divergence: an unassigned code point measures 1 here and 0 in glibc, which * would need the assigned-character set on top of the width table. * * Mirrors Python's `char_width`. */ export declare function charWidth(cp: number): number; /** * Whether the character at `cp` separates words for `wc -w`. * * GNU splits on glibc's `iswspace`, which is Unicode White_Space minus * U+0085. JavaScript's `\s` is not that set: it also matches U+FEFF, so * `wc -w` over-counted words containing a byte-order mark. The generated * table is the pinned set. * * Mirrors Python's `is_space`. */ export declare function isSpace(cp: number): boolean; /** * Move `column` past the character at `cp`, GNU `wc -L` style. * * A tab jumps to the next multiple of `TAB_WIDTH` — so a tab in column 0 * lands on 8, which is why `printf 'a\tb' | wc -L` is 9 and not 3. Carriage * return and form feed return the cursor to column 0 rather than ending the * line, so `printf 'a\rb' | wc -L` is 1. Callers handle the newline, which * ends the line outright. * * Mirrors Python's `advance_column`. */ export declare function advanceColumn(column: number, cp: number): number; //# sourceMappingURL=width.d.ts.map