string is broken; nothing compiles

This commit is contained in:
SimonFJ20 2025-03-19 17:27:49 +01:00
parent a7591a96ff
commit 0cbf4ca647
2 changed files with 3 additions and 3 deletions

View File

@ -55,10 +55,10 @@ StrSlice str_split_next(StrSplitter* splitter)
void string_push_str(String* string, const char* str)
{
for (size_t i = 0; i < strlen(str); ++i) {
string_push(string, str[i]);
string_data_push(string, str[i]);
}
string_push(string, '\0');
string_data_push(string, '\0');
string->size -= 1;
}

View File

@ -25,7 +25,7 @@ typedef struct {
StrSplitter str_splitter(const char* text, size_t text_len, const char* split);
StrSlice str_split_next(StrSplitter* splitter);
DEFINE_VEC(char, String, string)
DEFINE_VEC(char, String, string_data)
void string_push_str(String* string, const char* str);
void string_push_fmt_va(String* string, const char* fmt, ...);