def _get_index_sort_str(env, name):
    """
    Returns a string by which an object with the given name shall be sorted in
    indices.
    """
    
    ignored_prefixes = env.config.cmake_index_common_prefix
    for prefix in ignored_prefixes:
        if name.startswith(prefix) and name != prefix:
            return name[len(prefix):]
    
    return name