Updated: October 28, 2024 |
Get the key of a dictionary entry as a shareable string, based on its index
#include <sys/strm.h>
const strm_string_t* strm_dict_key_rstr(const strm_dict_t *dict, size_t n)
This function finds the key of the entry stored at the zero-based index given in n, in the dictionary specified by dict. It returns a handle to the shareable string containing the entry's key.
The returned handle is owned by the dictionary and remains valid until the dictionary handle is destroyed. You can clone the shareable string handle to have one that exists independently of the dictionary.
If the entry is found, a handle to the shareable string containing its key. If it's not found, a null pointer.