Mercurial > libedl
diff include/str.h @ 4:c2408abb258a
*: add dumping to string, rename EDL_file to EDL
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Dec 2023 16:24:16 -0500 |
parents | |
children | 0c98b46eaf73 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/str.h Mon Dec 25 16:24:16 2023 -0500 @@ -0,0 +1,17 @@ +#ifndef __edl__internal__str_h +#define __edl__internal__str_h + +#include <stddef.h> + +typedef struct { + size_t size; + size_t capacity; + char* data; +} EDL_internal_string; + +int EDL_internal_string_init(EDL_internal_string* str); +int EDL_internal_string_allocate(EDL_internal_string* str, size_t new_capacity); +int EDL_internal_string_append(EDL_internal_string* str, const char* data, const size_t length); +void EDL_internal_string_free(EDL_internal_string* str); + +#endif // __edl__internal__str_h