diff options
| author | Syndamia <kamen@syndamia.com> | 2026-04-21 19:32:40 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-04-21 19:32:40 +0300 |
| commit | 2a0c6b4cfeb5d1725e65e714ce7f324583dfa388 (patch) | |
| tree | 082ff93f570dccaffd9b5d051ca33b92c74a58d2 /String.h | |
| download | foollib-2a0c6b4cfeb5d1725e65e714ce7f324583dfa388.tar foollib-2a0c6b4cfeb5d1725e65e714ce7f324583dfa388.tar.gz foollib-2a0c6b4cfeb5d1725e65e714ce7f324583dfa388.zip | |
feat!: Initial implementation
Diffstat (limited to 'String.h')
| -rw-r--r-- | String.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/String.h b/String.h new file mode 100644 index 0000000..3955339 --- /dev/null +++ b/String.h @@ -0,0 +1,25 @@ +#ifndef _STRING +#define _STRING + +#include "BumpAlloc.h" + +typedef char* String; + +String String_new(BumpArena b, const char* str); +String String_newlen(BumpArena b, usize length); +String String_dup(BumpArena b, String s); +String String_concat(BumpArena b, ...); +String String_printf(BumpArena b, const char* fmt, ...); + +usize String_length(String s); +Result String_append(String s, const char* str); +Result String_prepend(String s, const char* str); +usize String_find(String s, char c); + +String String_Gnew(const char* str); +String String_Gnewlen(usize length); +String String_Gdup(String s); +String String_Gconcat(const char* str, ...); +String String_Gprintf(const char* fmt, ...); + +#endif /* _STRING */ |
