generate_key_for_index
Description:
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'.
Parameters:
this |
An Collator |
index |
An index into the alphabetic labels |
Returns:
A sort key for the given index |