Function rcutils_split
Defined in File split.h
Function Documentation
-
rcutils_ret_t rcutils_split(const char *str, char delimiter, rcutils_allocator_t allocator, rcutils_string_array_t *string_array)
Split a given string with the specified delimiter.
- Parameters:
str – [in] string to split
delimiter – [in] on where to split
allocator – [in] for allocating new memory for the output array
string_array – [out] with the split tokens
- 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_ERROR if an unknown error occurs