Function rcutils_string_array_cmp

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 before rhs in lexicographical order. Zero if lhs and rhs are equal. Positive value if lhs appears after rhs 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 iflhs->dataorrhs->dataisNULL, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.