utf8CollateKey

Converts a string into a collation key that can be compared with other collation keys produced by the same function using strcmp().

The results of comparing the collation keys of two strings with strcmp() will always be the same as comparing the two original keys with glib.global.utf8Collate.

Note that this function depends on the [current locale]setlocale.

string
utf8CollateKey
(
string str
,
ptrdiff_t len
)

Parameters

str string

a UTF-8 encoded string.

len ptrdiff_t

length of str, in bytes, or -1 if str is nul-terminated.

Return Value

Type: string

a newly allocated string. This string should be freed with glib.global.gfree when you are done with it.