libunibreak 8.0.1
Loading...
Searching...
No Matches
graphemebreak.h File Reference

Header file for the grapheme breaking algorithm. More...

#include <stddef.h>
#include "unibreakbase.h"
Include dependency graph for graphemebreak.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GRAPHEMEBREAK_BREAK   0
 Between two graphemes.
#define GRAPHEMEBREAK_NOBREAK   1
 Inside a grapheme.
#define GRAPHEMEBREAK_INSIDEACHAR   2
 Inside a Unicode character.

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.

Detailed Description

Header file for the grapheme breaking algorithm.

Author
Andreas Röver

Macro Definition Documentation

◆ GRAPHEMEBREAK_BREAK

#define GRAPHEMEBREAK_BREAK   0

Between two graphemes.

◆ GRAPHEMEBREAK_INSIDEACHAR

#define GRAPHEMEBREAK_INSIDEACHAR   2

Inside a Unicode character.

◆ GRAPHEMEBREAK_NOBREAK

#define GRAPHEMEBREAK_NOBREAK   1

Inside a grapheme.

Function Documentation

◆ init_graphemebreak()

void init_graphemebreak ( void )

Initializes the wordbreak internals.

It currently does nothing, but it may in the future.

◆ set_graphemebreaks_utf16()

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.

Parameters
[in]sinput UTF-16 string
[in]lenlength of the input
[in]langlanguage of the input (reserved for future use)
[out]brkspointer to the output breaking data, containing GRAPHEMEBREAK_BREAK, GRAPHEMEBREAK_NOBREAK, or GRAPHEMEBREAK_INSIDEACHAR

◆ set_graphemebreaks_utf32()

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.

Parameters
[in]sinput UTF-32 string
[in]lenlength of the input
[in]langlanguage of the input (reserved for future use)
[out]brkspointer to the output breaking data, containing GRAPHEMEBREAK_BREAK or GRAPHEMEBREAK_NOBREAK

◆ set_graphemebreaks_utf8()

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.

Parameters
[in]sinput UTF-8 string
[in]lenlength of the input
[in]langlanguage of the input (reserved for future use)
[out]brkspointer to the output breaking data, containing GRAPHEMEBREAK_BREAK, GRAPHEMEBREAK_NOBREAK, or GRAPHEMEBREAK_INSIDEACHAR