strm_dict_key_delete()

Updated: May 06, 2022

Delete a dictionary entry by key

Synopsis:

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

Arguments:

dict
A dictionary handle.
key
The key of the entry to delete.

Library:

libstrm

Description:

This function creates a new dictionary that is an exact replica of the one specified by dict, except that the entry specified by key is deleted.

If no such entry is found, the original dictionary is left unmodified and the same handle is returned. If an entry is found, the original dictionary handle is destroyed and a handle to the new dictionary is returned.

Returns:

On success, a handle to the new dictionary (when the entry was deleted) or to the existing dictionary (when the entry wasn't found). On failure, a null pointer.