data_structures
Functions
array_insert.c File Reference
#include "array.h"
#include "array_utils.h"
+ Include dependency graph for array_insert.c:

Go to the source code of this file.

Functions

void array_insert (t_array *array, size_t index, const void *content)
 Inserts a copy of the specified item at the specified index. More...
 

Function Documentation

◆ array_insert()

void array_insert ( t_array array,
size_t  index,
const void *  content 
)

Inserts a copy of the specified item at the specified index.

Parameters
indexThe index at which to insert
contentThe item to be copied
Note
This function has linear complexity in the number of elements in the worst-case.

Definition at line 17 of file array_insert.c.