Function

uni_normchk

Normalization check.

Since v1.0
unistat uni_normchk(
uninormform form, const void *text, unisize text_len, uniattr text_attr, bool *result)

Parameters πŸ”—

form in

Normalization form to check for.

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 UNI_YES or UNI_NO.

Return Value πŸ”—

UNI_OK

On success.

UNI_BAD_OPERATION

If text or result is NULL.

UNI_BAD_ENCODING

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

UNI_FEATURE_DISABLED

If Unicorn was built without support for normform.

Discussion πŸ”—

Checks if text is normalized. This functions is more β€œexpensive” than uni_normqchk, but it returns a definitive yes or no answer as to whether text is normalized.

See Also πŸ”—