diff options
Diffstat (limited to 'String.h')
| -rw-r--r-- | String.h | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -6,18 +6,29 @@ typedef char* String; +/* Create */ + 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); +/* Free */ + +Result S_free(String *s); + +/* Modify */ + Result S_append(String *s, const char* str); Result S_prepend(String *s, const char* str); -usize S_find(String s, char c); -Result S_free(String s); + +/* Get */ + +usize S_length(String s); +usize S_find(String s, char c); #endif /* _STRING */ |
