strm_dict_value_rstr()

Updated: April 19, 2023

Get the value of a dictionary entry as a shareable string, based on its index

Synopsis:

#include <sys/strm.h>
const strm_string_t* strm_dict_value_rstr(const strm_dict_t *dict,
                                          size_t n)

Arguments:

dict
A dictionary handle.
n
The zero-based index of the entry whose value is being retrieved.

Library:

libstrm

Description:

This function finds the value 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 value.

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.

Returns:

If the entry is found, a handle to the shareable string containing its value. If it's not found, a null pointer.