Add dstr_t type
This commit is contained in:
19
include/dstring/dstring.h
Normal file
19
include/dstring/dstring.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef DSTRING_H
|
||||
#define DSTRING_H
|
||||
|
||||
#include "aliases.h"
|
||||
|
||||
typedef struct dstr dstr_t;
|
||||
|
||||
dstr_t *dstr_with_capacity(u64 capacity);
|
||||
dstr_t *dstr_from_string(const char *str);
|
||||
void update_dstr(dstr_t **dst, const char *src);
|
||||
void delete_dstr(dstr_t **str);
|
||||
void concat_dstr(dstr_t **dst, const char *src);
|
||||
void append_to_dstr(dstr_t **dst, char c);
|
||||
void empty_dstr(dstr_t *str);
|
||||
void print_dstr(const dstr_t *str);
|
||||
u64 dstr_length(const dstr_t *str);
|
||||
u64 dstr_capacity(const dstr_t *str);
|
||||
|
||||
#endif // !DSTRING_H
|
Reference in New Issue
Block a user