rcutils
master
C API providing common utilities and data structures.
|
Go to the documentation of this file.
15 #ifndef RCUTILS__TYPES__STRING_ARRAY_H_
16 #define RCUTILS__TYPES__STRING_ARRAY_H_
205 sizeof(string_array->
data[0]),
213 #endif // RCUTILS__TYPES__STRING_ARRAY_H_
rcutils_allocator_t allocator
Definition: string_array.h:36
Definition: string_array.h:32
int rcutils_string_array_sort_compare(const void *lhs, const void *rhs)
Lexicographic comparer for pointers to string pointers.
#define RCUTILS_PUBLIC_TYPE
Definition: visibility_control.h:29
#define RCUTILS_RET_INVALID_ARGUMENT
Invalid argument return code.
Definition: rcutils_ret.h:31
#define RCUTILS_CHECK_FOR_NULL_WITH_MSG(value, msg, error_statement)
Check a value for null, with an error message and error statement.
Definition: error_handling.h:185
int rcutils_ret_t
Definition: rcutils_ret.h:23
rcutils_ret_t rcutils_string_array_sort(rcutils_string_array_t *string_array)
Sort a string array according to lexicographical order.
Definition: string_array.h:197
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.
#define RCUTILS_WARN_UNUSED
Definition: macros.h:24
rcutils_ret_t rcutils_string_array_fini(rcutils_string_array_t *string_array)
Finalize a string array, reclaiming all resources.
Encapsulation of an allocator.
Definition: allocator.h:45
rcutils_string_array_t rcutils_get_zero_initialized_string_array(void)
Return an empty string array struct.
rcutils_ret_t rcutils_string_array_resize(rcutils_string_array_t *string_array, size_t new_size)
Resize a string array, reclaiming removed resources.
#define RCUTILS_PUBLIC
Definition: visibility_control.h:23
rcutils_ret_t rcutils_string_array_init(rcutils_string_array_t *string_array, size_t size, const rcutils_allocator_t *allocator)
Initialize a string array with a given size.
struct rcutils_string_array_t rcutils_string_array_t
size_t size
Definition: string_array.h:34
rcutils_ret_t rcutils_qsort(void *ptr, size_t count, size_t size, int(*comp)(const void *, const void *))
Interface to qsort with rcutils-style argument validation.
char ** data
Definition: string_array.h:35