About dynlist
Dynlist is by design a library to implement flexible memory allocation, as opposed to the classic way to use arrays in C/C++. The problem of overly static allocation had been addressed in C++s' vectors, but no satisfactory C solution was made. Dynlist aims to fill that void. Some concepts might seem familiar to python programmers, and that's because python's concepts of lists was a main source of inspiration.
Features
The following features are currently implemented:
- Creating and deleting (clearing) dynlist objects
- Creating and removing items within a list
- Adding an item to a list at a specified index
- Retrieving an item from a list at a specified index
- Compiling a dynamic list to a static array
- Decompiling a static array to a dynamic list
- Retrieving the total number of bytes used by a specified list
- Retrieving the number of items within a list
- Swap two items in a list at specified indices
- Reverse a list in-place
- Join two lists
- Splitting a list
- Support for python-style negative indexing
|