logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

unicode_grapheme_break, unicode_grapheme_break_init, unicode_grapheme_break_next,

Author

SamVarshavchik
           Author

Description

       These functions implement the unicode grapheme cluster breaking algorithm. Invoke
       unicode_grapheme_break_init() to initialize the grapheme cluster breaking algorithm.
       unicode_grapheme_break_init() returns an opaque handle. Each subsequent call to
       unicode_grapheme_break_next() passes this handle, and the next character.  unicode_grapheme_break_next()
       returns a non-0 value if there's a grapheme break before the character, in a sequence of Unicode
       characters.  unicode_grapheme_break_deinit() releases all resources used by the grapheme breaking handle,
       and the unicode_grapheme_break_info_t handle is no longer valid after this call.

       The first call to unicode_grapheme_break_next() always returns non-0, as per the GB1 rule.

       unicode_grapheme_break() is a simplified interface that returns non-zero if there is a grapheme break
       between two unicode characters a and b. This is is equivalent to calling unicode_grapheme_break_init(),
       followed by two calls to
        unicode_grapheme_break_next(), and finally unicode_grapheme_break_deinit(), then returning the result of
       the second call to unicode_grapheme_break_next().

Name

       unicode_grapheme_break, unicode_grapheme_break_init, unicode_grapheme_break_next,
       unicode_grapheme_break_deinit - unicode grapheme cluster boundary rules

Notes

        1. TR-29
           https://www.unicode.org/reports/tr29/tr29-43.html

Courier Unicode Library                            05/18/2024                            UNICODE_GRAPHEME_BRE(3)

See Also

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

Synopsis

#include<courier-unicode.h>unicode_grapheme_break_info_tunicode_grapheme_break_init(void);intunicode_grapheme_next(unicode_grapheme_break_info_thandle,char32_tc);voidunicode_grapheme_deinit(unicode_grapheme_break_info_thandle);intunicode_grapheme_break(char32_ta,char32_tb);

See Also