Type
uniattr
Text attributes.
Since v1.0
typedef uint32_t uniattr
Discussion 🔗
This type represents a bit mask of text attributes. Unless documented otherwise, all functions that accept a uniattr must observe the following rules:
There must be exactly one of the following character encoding flags present.
There can optionally be one of the following endian flags. If none are present, then native byte order is assumed. These flags are incompatible with UNI_SCALAR which is always in native byte order. These flags have no effect with UNI_UTF8 because UTF-8 is endian independent.
There can optionally be any combination of the following flags.
The following example demonstrates using these flags with uni_next to parse the first code point of a UTF-16 big endian string.
const char16_t text[] = u"Hello, World!";
int index = 0;
unichar cp;
uni_next(text, -1, UNI_UTF16 | UNI_BIG, &index, &cp);