|
libunibreak 8.0.1
|
Implementation of the grapheme breaking algorithm as described in Unicode Standard Annex 29. More...
#include <string.h>#include "graphemebreak.h"#include "graphemebreakdata.c"#include "indicconjunctbreakdata.c"#include "indicconjunctbreakdef.h"#include "emojidef.h"#include "unibreakdef.h"Macros | |
| #define | UNIBREAK_LAZY_INCB 0 |
Enumerations | |
| enum | Rule9cStage { R9C_INACTIVE , R9C_STARTED , R9C_LINKER , R9C_END } |
Functions | |
| void | init_graphemebreak (void) |
| Initializes the wordbreak internals. | |
| void | set_graphemebreaks_utf8 (const utf8_t *s, size_t len, const char *lang, char *brks) |
| Sets the grapheme breaking information for a UTF-8 input string. | |
| void | set_graphemebreaks_utf16 (const utf16_t *s, size_t len, const char *lang, char *brks) |
| Sets the grapheme breaking information for a UTF-16 input string. | |
| void | set_graphemebreaks_utf32 (const utf32_t *s, size_t len, const char *lang, char *brks) |
| Sets the grapheme breaking information for a UTF-32 input string. | |
Implementation of the grapheme breaking algorithm as described in Unicode Standard Annex 29.
| #define UNIBREAK_LAZY_INCB 0 |
| enum Rule9cStage |
| void init_graphemebreak | ( | void | ) |
Initializes the wordbreak internals.
It currently does nothing, but it may in the future.
| void set_graphemebreaks_utf16 | ( | const utf16_t * | s, |
| size_t | len, | ||
| const char * | lang, | ||
| char * | brks ) |
Sets the grapheme breaking information for a UTF-16 input string.
Code units belonging to an incomplete UTF-16 sequence are marked GRAPHEMEBREAK_INSIDEACHAR.
| [in] | s | input UTF-16 string |
| [in] | len | length of the input |
| [in] | lang | language of the input (reserved for future use) |
| [out] | brks | pointer to the output breaking data, containing GRAPHEMEBREAK_BREAK, GRAPHEMEBREAK_NOBREAK, or GRAPHEMEBREAK_INSIDEACHAR |
| void set_graphemebreaks_utf32 | ( | const utf32_t * | s, |
| size_t | len, | ||
| const char * | lang, | ||
| char * | brks ) |
Sets the grapheme breaking information for a UTF-32 input string.
| [in] | s | input UTF-32 string |
| [in] | len | length of the input |
| [in] | lang | language of the input (reserved for future use) |
| [out] | brks | pointer to the output breaking data, containing GRAPHEMEBREAK_BREAK or GRAPHEMEBREAK_NOBREAK |
| void set_graphemebreaks_utf8 | ( | const utf8_t * | s, |
| size_t | len, | ||
| const char * | lang, | ||
| char * | brks ) |
Sets the grapheme breaking information for a UTF-8 input string.
Code units belonging to an incomplete UTF-8 sequence are marked GRAPHEMEBREAK_INSIDEACHAR.
| [in] | s | input UTF-8 string |
| [in] | len | length of the input |
| [in] | lang | language of the input (reserved for future use) |
| [out] | brks | pointer to the output breaking data, containing GRAPHEMEBREAK_BREAK, GRAPHEMEBREAK_NOBREAK, or GRAPHEMEBREAK_INSIDEACHAR |