18 lines
325 B
C
18 lines
325 B
C
#ifndef _STRBUF_H
|
|
#define _STRBUF_H
|
|
|
|
#include <stddef.h>
|
|
|
|
struct strbuf {
|
|
char* items;
|
|
size_t count, capacity;
|
|
};
|
|
|
|
void strbuf_append(struct strbuf* strbuf, char c);
|
|
|
|
void strbuf_append_str(struct strbuf* strbuf, const char* s);
|
|
|
|
void strbuf_append_n(struct strbuf* strbuf, const char* s, size_t n);
|
|
|
|
#endif // _STRBUF_H
|