skip to content
==> include/tui/grapheme.h <==
1/* @ajax/tui-grapheme: user-perceived characters. A terminal cell holds one extended grapheme
2 * cluster ("e" + combining accent, a flag, a ZWJ emoji family); this splits UTF-8 text into them
3 * with the rules of UAX #29 (GB3-GB13, including GB9c Indic conjuncts), the same boundaries as
4 * Rust's unicode-segmentation 1.13.3 `graphemes(true)`. */
5#ifndef TUI_GRAPHEME_H
6#define TUI_GRAPHEME_H
7
8#include <stddef.h>
9
10/* The end (exclusive) of the grapheme cluster that starts at byte start of s[0..len). */
11size_t tui_grapheme_next(const char *s, size_t len, size_t start);
12
13#endif