1UNICODE_GRAPHEME_BRE(3)     Courier Unicode Library    UNICODE_GRAPHEME_BRE(3)
2
3
4

NAME

6       unicode_grapheme_break, unicode_grapheme_break_init,
7       unicode_grapheme_break_next, unicode_grapheme_break_deinit - unicode
8       grapheme cluster boundary rules
9

SYNOPSIS

11       #include <courier-unicode.h>
12
13       unicode_grapheme_break_info_t unicode_grapheme_break_init(void);
14
15       int unicode_grapheme_next(unicode_grapheme_break_info_t handle,
16                                 char32_t c);
17
18       void unicode_grapheme_deinit(unicode_grapheme_break_info_t handle);
19
20       int unicode_grapheme_break(char32_t a, char32_t b);
21

DESCRIPTION

23       These functions implement the unicode grapheme cluster breaking
24       algorithm. Invoke unicode_grapheme_break_init() to initialize the
25       grapheme cluster breaking algorithm.  unicode_grapheme_break_init()
26       returns an opaque handle. Each subsequent call to
27       unicode_grapheme_break_next() passes this handle, and the next
28       character.  unicode_grapheme_break_next() returns a non-0 value if
29       there's a grapheme break before the character, in a sequence of Unicode
30       characters.  unicode_grapheme_break_deinit() releases all reosurces
31       used by the grapheme breaking handle, and the
32       unicode_grapheme_break_info_t handle is no longer valid after this
33       call.
34
35       The first call to unicode_grapheme_break_next() always returns non-0,
36       as per the GB1 rule.
37
38       unicode_grapheme_break() is a simplified interface that returns
39       non-zero if there is a grapheme break between two unicode characters a
40       and b. This is is equivalent to calling unicode_grapheme_break_init(),
41       followed by two calls to
42        unicode_grapheme_break_next(), and finally
43       unicode_grapheme_break_deinit(), then returning the result of the
44       second call to unicode_grapheme_break_next().
45

SEE ALSO

47       TR-29[1], courier-unicode(7), unicode_convert_tocase(3),
48       unicode_line_break(3), unicode_word_break(3).
49

AUTHOR

51       Sam Varshavchik
52           Author
53

NOTES

55        1. TR-29
56           https://www.unicode.org/reports/tr29/tr29-37.html
57
58
59
60Courier Unicode Library           05/31/2022           UNICODE_GRAPHEME_BRE(3)
Impressum