Function rcutils_string_map_unset

Function Documentation

rcutils_ret_t rcutils_string_map_unset(rcutils_string_map_t *string_map, const char *key)

Unset a key value pair in the map.

The key needs to be a null terminated c string. If the given key is not found, RCUTILS_RET_STRING_KEY_NOT_FOUND is returned.

Parameters:
  • string_map[inout] rcutils_string_map_t to be updated

  • key[in] map key, must be null terminated c string

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or

Returns:

RCUTILS_RET_STRING_KEY_NOT_FOUND if key not found, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.