Mission Base

Program Base Library Functions

void* pblListRemoveAt

( PblList* list, int index )

Removes the element at the specified position in this list.

Documentation

Removes the element at the specified position in this list.

Shifts any subsequent elements to the left (subtracts one from their indices).

For array lists removing from the end of the list has a time complexity of O(1), while removing from the beginning of the list has a time complexity of O(N) with N being the number of elements in the list.

For linked lists removing from the beginning or the end of the list has a time complexity of O(1), while removing from a random position in the middle of the list has a time complexity of O(N) with N being the number of elements in the list.

Parameters:
list - The list to use
index - The index at which the element is to be removed
Returns:
void * retptr != (void*)-1: The element that was removed, can be NULL.
void * retptr == (void*)-1: An error, see pbl_errno:
PBL_ERROR_OUT_OF_BOUNDS - Index is out of range (index < 0 || index >= size()).

Alphabetic index



This page was generated with the help of DOC++.