Function rcutils_string_map_set
Defined in File string_map.h
Function Documentation
-
rcutils_ret_t rcutils_string_map_set(rcutils_string_map_t *string_map, const char *key, const char *value)
Set a key value pair in the map, increasing capacity if necessary.
The capacity will be increased if needed using rcutils_string_map_reserve(). Otherwise it is the same as rcutils_string_map_set_no_resize().
See also
- Parameters:
string_map – [inout] rcutils_string_map_t to be updated
key – [in] map key, must be null terminated c string
value – [in] value for given 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_BAD_ALLOC if memory allocation fails, or
- Returns:
RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or
- Returns:
RCUTILS_RET_ERROR if an unknown error occurs.