重构
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
#ifndef INCLUDED_C_STRINGLIST_H
|
||||
#define INCLUDED_C_STRINGLIST_H
|
||||
|
||||
#ifndef INCLUDED_C_TYPES_H
|
||||
#include <c_Types.h>
|
||||
#endif /*INCLUDED_C_TYPES_H*/
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
|
||||
typedef struct {
|
||||
char** strings; // Dynamic array of self-owned null-terminated strings
|
||||
c_size_t size; // Current active string rows stored
|
||||
c_size_t capacity; // Max allocated capacity bounds of the internal pointer matrix
|
||||
} c_StringList;
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
c_err_t c_StringList_Init(c_StringList* list, c_size_t initial_capacity);
|
||||
|
||||
void c_StringList_Destroy(c_StringList* list);
|
||||
|
||||
c_err_t c_StringList_Append(c_StringList* list, const char* str);
|
||||
|
||||
c_err_t c_StringList_Prepend(c_StringList* list, const char* str);
|
||||
|
||||
c_err_t c_StringList_Remove(c_StringList* list, const char* str);
|
||||
|
||||
#endif /*INCLUDED_C_STRINGLIST_H*/
|
||||
Reference in New Issue
Block a user