strm_dict_find_index()

Updated: April 19, 2023

Get the index of a dictionary entry based on its key

Synopsis:

#include <sys/strm.h>
ssize_t strm_dict_find_index(const strm_dict_t *dict,
                             const char *key)

Arguments:

dict
A dictionary handle.
key
The key of the entry whose index is being retrieved.

Library:

libstrm

Description:

This function returns the index of the entry specified by key and found in the dict dictionary. The index is zero-based.

Returns:

If the entry is found, its zero-based index is returned. If it's not found, -1 is returned.