Function

uni_prevbrk

Compute preceding boundary.

Since v1.0
unistat uni_prevbrk(
unibreak boundary, const void *text, unisize text_len, uniattr text_attr, unisize *index)

Parameters πŸ”—

boundary in

Boundary to detect.

text in

The text to segment.

text_len in

Number of code units in text or -1 if it’s null terminated.

text_attr in

Attributes of text.

index inout

Code point boundary as a code unit offset in text.

Return Value πŸ”—

UNI_OK

If the break iterator was successfully repositioned.

UNI_DONE

If index is at the beginning of text.

UNI_BAD_OPERATION

If text or index is NULL.

UNI_BAD_ENCODING

If text is malformed; this is never returned if text_attr has UNI_TRUST.

Discussion πŸ”—

Compute the preceding boundary for text starting from a known code point specified by code unit index index. The implementation sets index to the code unit offset of the preceding boundary.