data_structures
Functions
list_unlink.c File Reference
#include "list.h"
+ Include dependency graph for list_unlink.c:

Go to the source code of this file.

Functions

void * list_unlink (t_list *alst, size_t index)
 Removes the item at the specified position in the list and returns it. More...
 

Function Documentation

◆ list_unlink()

void* list_unlink ( t_list alst,
size_t  index 
)

Removes the item at the specified position in the list and returns it.

Returns
The item in the list, or NULL if the list is empty.
Note
This method has complexity O(N/2) in the number of items in the worst case.

Definition at line 41 of file list_unlink.c.