Function

uni_caseconvchk

Check case status.

Since v1.0
unistat uni_caseconvchk(
unicaseconv casing, const void *text, unisize text_len, uniattr text_attr, bool *result)

Parameters 🔗

casing in

Casing operation to apply to text.

text in

Input text.

text_len in

Number of code units in text or -1 if text is null terminated.

text_attr in

Attributes of text.

result out

Set to true or false.

Return Value 🔗

UNI_OK

On success.

UNI_BAD_OPERATION

If text or result is NULL.

UNI_BAD_ENCODING

If text is not well-formed (checks are omitted if src_attr has UNI_TRUST).

UNI_FEATURE_DISABLED

If Unicorn was built without support for case conversion.

Discussion 🔗

Check if text is in casing form casing. If it is, then the implementation writes true to result else it writes false.

The text attributes of text are specified by text_attr. If text_len is -1, then the implementation assumes text is null terminated.