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
lhsappears beforerhsin lexicographical order. Zero iflhsandrhsare equal. Positive value iflhsappears afterrhsin 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 iflhs->dataorrhs->dataisNULL, or- Returns:
RCUTILS_RET_ERROR if an unknown error occurs.