Return StringUpdate from the dstr update functions
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "aliases.h"
|
||||
#include "mem_arena.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,10 +11,16 @@ extern "C" {
|
||||
|
||||
typedef struct dstr String;
|
||||
|
||||
typedef struct string_update StringUpdate;
|
||||
struct string_update {
|
||||
bool updated;
|
||||
String *str;
|
||||
};
|
||||
|
||||
String *wapp_dstr_with_capacity(u64 capacity, Arena *arena);
|
||||
String *wapp_dstr_from_string(const char *str, Arena *arena);
|
||||
String *wapp_dstr_update(String **dst, const char *src, Arena *arena);
|
||||
String *wapp_dstr_concat(String **dst, const char *src, Arena *arena);
|
||||
StringUpdate wapp_dstr_update(String **dst, const char *src, Arena *arena);
|
||||
StringUpdate wapp_dstr_concat(String **dst, const char *src, Arena *arena);
|
||||
void wapp_dstr_clear(String *str);
|
||||
void wapp_dstr_print(const String *str);
|
||||
i64 wapp_dstr_find(const String *str, const char *substr);
|
||||
|
Reference in New Issue
Block a user