diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-19 09:33:30 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-19 10:00:27 +0200 |
| commit | 7bc2fb906b41960eba4391d7dbf7526ea02d5afd (patch) | |
| tree | 85515c975da361a19b364a2856a35bc8180d12e2 /array.h | |
| parent | 22bb54a965ac38c02cd12220fa95af4ee5f7f83d (diff) | |
| download | vis-7bc2fb906b41960eba4391d7dbf7526ea02d5afd.tar.gz vis-7bc2fb906b41960eba4391d7dbf7526ea02d5afd.tar.xz | |
array: implement array_truncate
Diffstat (limited to 'array.h')
| -rw-r--r-- | array.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -56,5 +56,7 @@ bool array_remove(Array*, size_t idx); size_t array_length(Array*); /* return the number of elements which can be stored without enlarging the array */ size_t array_capacity(Array*); +/* remove all elements at index >= length, keep allocated memory */ +bool array_truncate(Array*, size_t length); #endif |
