collate_key


Description:

[ CCode ( cname = "g_utf8_collate_key" ) ]
public string collate_key (ssize_t len = -1)

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 collate.

Note that this function depends on the current locale.

Parameters:

len

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

str

a UTF-8 encoded string.

Returns:

a newly allocated string. This string should be freed with g_free when you are done with it.