aboutsummaryrefslogtreecommitdiff
path: root/String.h
diff options
context:
space:
mode:
Diffstat (limited to 'String.h')
-rw-r--r--String.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/String.h b/String.h
index 9be9195..16f1990 100644
--- a/String.h
+++ b/String.h
@@ -1,25 +1,23 @@
#ifndef _STRING
#define _STRING
-#include "BumpAlloc.h"
+#include "MemoryManager.h"
+#include <stdarg.h>
typedef char* String;
-String S_new(BumpArena b, const char* str);
-String S_newlen(BumpArena b, usize length);
-String S_dup(BumpArena b, String s);
-String S_concat(BumpArena b, ...);
-String S_printf(BumpArena b, const char* fmt, ...);
+String S_new(MemoryManager *mm, const char* str);
+String S_newlen(MemoryManager *mm, usize length);
+String S_dup(MemoryManager *mm, String s);
+String S_vconcat(MemoryManager *mm, va_list args);
+String S_concat(MemoryManager *mm, ...);
+String S_vprintf(MemoryManager *mm, const char* fmt, va_list args);
+String S_printf(MemoryManager *mm, const char* fmt, ...);
usize S_length(String s);
-Result S_append(String s, const char* str);
-Result S_prepend(String s, const char* str);
+Result S_append(String *s, const char* str);
+Result S_prepend(String *s, const char* str);
usize S_find(String s, char c);
-
-String SG_new(const char* str);
-String SG_newlen(usize length);
-String SG_dup(String s);
-String SG_concat(const char* str, ...);
-String SG_printf(const char* fmt, ...);
+Result S_free(String s);
#endif /* _STRING */