Foundations

This commit is contained in:
2026-08-29 01:50:50 +08:00
parent bf5fc3bda6
commit 8e95904cc4
100 changed files with 13997 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#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*/