Function in stdx_array.h

x_array_back

Get a pointer to the last element in the array.

X_ARRAY_API void * x_array_back(XArray *array);

Parameters

XArray *array
Pointer to the array.

Returns

Pointer to the last element.

Function in stdx_array.h

x_array_capacity

Get the current capacity of the array.

X_ARRAY_API uint32_t x_array_capacity(XArray *arr);

Parameters

XArray *arr
Pointer to the array.

Returns

Maximum number of elements the array can hold without resizing.

Function in stdx_array.h

x_array_count

Get the number of elements currently stored in the array.

X_ARRAY_API uint32_t x_array_count(XArray *arr);

Parameters

XArray *arr
Pointer to the array.

Returns

Number of elements in the array.

Function in stdx_array.h

x_array_data

Get a pointer to the underlying data buffer.

X_ARRAY_API void * x_array_data(XArray *arr);

Parameters

XArray *arr
Pointer to the array.

Returns

Pointer to the internal contiguous data storage.

Function in stdx_array.h

x_array_get

Get a pointer to the element at the given index.

X_ARRAY_API void * x_array_get(
 XArray *arr,
 unsigned int index
);

Parameters

XArray *arr
Pointer to the array.
unsigned int index
Zero-based index of the element.

Returns

Pointer to the element at the given index.

Function in stdx_array.h

x_array_is_empty

Check whether the array is empty.

X_ARRAY_API bool x_array_is_empty(XArray *array);

Parameters

XArray *array
Pointer to the array.

Returns

True if the array contains no elements, false otherwise.