Function rcutils_string_array_cmp
Defined in File string_array.h
Function Documentation
-
rcutils_ret_t rcutils_string_array_cmp(const rcutils_string_array_t *lhs, const rcutils_string_array_t *rhs, int *res)
Compare two string arrays.
The two string arrays are compared according to lexicographical order.
- Parameters:
lhs – [in] The first string array.
rhs – [in] The second string array.
res – [out] Negative value if
lhs
appears beforerhs
in lexicographical order. Zero iflhs
andrhs
are equal. Positive value iflhs
appears afterrhs
in lexographical order.
- Returns:
RCUTILS_RET_OK if successful, or
- Returns:
RCUTILS_RET_INVALID_ARGUMENT if any argument is
NULL, or \return #RCUTILS_RET_INVALID_ARGUMENT if
lhs->dataor
rhs->datais
NULL, or- Returns:
RCUTILS_RET_ERROR if an unknown error occurs.