Perform line breaking algorithm.
More...
Perform line breaking algorithm.
Perform line breaking algorithm on complete input.
This function will consume constant size of heap.
- Parameters
-
[in] | lbobj | linebreak object. |
[in] | input | Unicode string. |
- Returns
- array of broken grapheme cluster strings terminated by NULL. If internal error occurred, lbobj->errnum is set then NULL is returned.
Perform line breaking algorithm on complete input.
This function will consume heap size proportional to input size. linebreak_break() is highly recommended.
- Parameters
-
[in] | lbobj | linebreak object. |
[in] | input | Unicode string. |
- Returns
- array of broken grapheme cluster strings terminated by NULL. If internal error occurred, lbobj->errnum is set then NULL is returned.
Perform line breaking algorithm on UTF-8 text
This function will consume constant size of heap.
- Parameters
-
[in] | lbobj | linebreak object. |
[in] | input | UTF-8 string, must not be NULL. |
[in] | len | length of UTF-8 string. |
[in] | check | check input. See sombok_decode_utf8(). |
- Returns
- array of broken grapheme cluster strings terminated by NULL. If internal error occurred, lbobj->errnum is set then NULL is returned.
Perform line breaking algorithm with incremental inputs.
- Parameters
-
[in] | lbobj | linebreak object. |
[in] | input | Unicode string; give NULL to specify end of input. |
- Returns
- array of (partial) broken grapheme cluster strings terminated by NULL. If internal error occurred, lbobj->errnum is set then NULL is returned.
void linebreak_free_result |
( |
gcstring_t ** |
result, |
|
|
int |
deep |
|
) |
| |
- Deprecated:
- Use linebreak_get_lbrule().
Get breaking rule between two classes
From given two line breaking classes, get breaking rule determined by internal data.
- Parameters
-
[in] | a_idx | line breaking class. |
[in] | b_idx | line breaking class. |
- Returns
- line breaking action: MANDATORY, DIRECT, INDIRECT or PROHIBITED. If action was not determined, returns DIRECT.
- Note
- This method gives just approximate description of line breaking behavior. Especially, it won't give meaningful value related to classes AI and CJ. See also linebreak_get_lbrule().