StringList implements dynamically extended list of C strings.
Internally, it's just a continuous array. When you append a string to the list, it is copied to the end of array.
It supports iteration via nextof() method (similar to List::nextof and Hashmap::nextof).
Currently nextof() uses strlen() to find position of next string. It would be nice to avoid strlen() call for faster iteration. We can do it by prepending string size before each string stored in list. When nextof() is called, it can lookup this size and just add it to the string pointer.
In addition, it would be nice to add prevof() method, that will return element previous to given one, or NULL for the first element.
StringList implements dynamically extended list of C strings.
Internally, it's just a continuous array. When you append a string to the list, it is copied to the end of array.
It supports iteration via nextof() method (similar to List::nextof and Hashmap::nextof).
Currently nextof() uses strlen() to find position of next string. It would be nice to avoid strlen() call for faster iteration. We can do it by prepending string size before each string stored in list. When nextof() is called, it can lookup this size and just add it to the string pointer.
In addition, it would be nice to add prevof() method, that will return element previous to given one, or NULL for the first element.