From b7c6c43b64dd88a3f3cff692bf224654aef9b1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 27 Dec 2016 23:21:20 +0100 Subject: array: implement array_remove --- array.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'array.h') diff --git a/array.h b/array.h index 052bb50..bee8725 100644 --- a/array.h +++ b/array.h @@ -50,6 +50,8 @@ bool array_set_ptr(Array*, size_t idx, void *item); /* add a new element to the end of the array */ bool array_add(Array*, void *item); bool array_add_ptr(Array*, void *item); +/* remove an element by index, might not shrink/release underlying memory */ +bool array_remove(Array*, size_t idx); /* return the number of elements currently stored in the array */ size_t array_length(Array*); -- cgit v1.2.3