strm_dict_subtract()

Updated: May 06, 2022

Subtract one dictionary from another

Synopsis:

#include <sys/strm.h>
strm_dict_t* strm_dict_subtract(strm_dict_t *left,
                                strm_dict_t const *right)

Arguments:

left
A handle to the first dictionary, which is the basis for the new dictionary.
right
A handle to the second dictionary, which contains the keys that you want to remove.

Library:

libstrm

Description:

This function creates a replica of the dictionary specified by left but with all entries that have matching keys in the one specified by right removed, regardless of their values.

Note that the function destroys the left handle, even on failure. If the same handle is passed in for both arguments, the function destroys it and returns a new handle to an empty dictionary. Otherwise, the right handle is preserved.

Returns:

A new handle to the resulting dictionary on success, or a null pointer on failure.