Function rcutils_string_array_sort

Function Documentation

inline rcutils_ret_t rcutils_string_array_sort(rcutils_string_array_t *string_array)

Sort a string array according to lexicographical order.

This function changes the order of the entries in a string array so that they are in lexicographically ascending order. Empty entries are placed at the end of the array.

Parameters:

string_array[inout] object whose elements should be sorted.

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.