Declare the functions
This commit is contained in:
parent
dee8783bdd
commit
8aedc60fb8
22
include/dstring.h
Normal file
22
include/dstring.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef DSTRING_H
|
||||||
|
#define DSTRING_H
|
||||||
|
|
||||||
|
#include "aliases.h"
|
||||||
|
|
||||||
|
typedef struct dstring dstr_t;
|
||||||
|
|
||||||
|
dstr_t *dstr_with_capacity(u64 capacity);
|
||||||
|
dstr_t *dstr_from_string(const char *str);
|
||||||
|
void dstr_update(dstr_t **dst, const char *src);
|
||||||
|
void dstr_free(dstr_t **str);
|
||||||
|
void dstr_concat(dstr_t **dst, const char *src);
|
||||||
|
void dstr_append(dstr_t **dst, char c);
|
||||||
|
void dstr_resize(dstr_t **str);
|
||||||
|
void dstr_clear(dstr_t *str);
|
||||||
|
void dstr_print(const dstr_t *str);
|
||||||
|
i64 dstr_find(const dstr_t *str, const char *substr);
|
||||||
|
u64 dstr_length(const dstr_t *str);
|
||||||
|
u64 dstr_capacity(const dstr_t *str);
|
||||||
|
const char *dstr_to_cstr(const dstr_t *str);
|
||||||
|
|
||||||
|
#endif // !DSTRING_H
|
Loading…
Reference in New Issue
Block a user