22 lines
380 B
C
22 lines
380 B
C
|
#ifndef MK_STR_H
|
||
|
#define MK_STR_H
|
||
|
|
||
|
#include "commons.h"
|
||
|
#include "vec.h"
|
||
|
|
||
|
struct str
|
||
|
{
|
||
|
size_t size;
|
||
|
size_t capacity;
|
||
|
char* value;
|
||
|
};
|
||
|
|
||
|
void str_init(struct str* self);
|
||
|
void str_free(struct str* self);
|
||
|
|
||
|
void str_push(struct str* self, char element);
|
||
|
void str_extend(struct str* self, char const* rhs);
|
||
|
void str_format(struct str* self, char const* format, ...);
|
||
|
|
||
|
#endif
|