### Method

# EDataServer Collator generate_key_for_index

since: 3.12

#### Declaration [src]

    gchar*
    e_collator_generate_key_for_index (
      ECollator* collator,
      gint index
    )

#### Description [src]

Generates a sort key for the given alphabetic `index`.

The generated sort key is guaranteed to sort below any sort keys for words beginning with any variant of the given letter.

For instance, a sort key generated for the index 5 of a latin alphabet, where the fifth index is ‘E’ will sort below any sort keys generated for words starting with the characters ‘e’, ‘E’, ‘é’, ‘É’, ‘è’ or ‘È’. It will also sort above any sort keys generated for words starting with the characters ‘d’ or ‘D’.

Available since: 3.12

#### Parameters

`index`

  Type: `gint`

  An index into the alphabetic labels.

#### Return value

Type: `gchar*`

A sort key for the given index.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.