]>
git.ipfire.org Git - thirdparty/kmod.git/blob - shared/strbuf.h
6 * Buffer abstract data type
14 void strbuf_init(struct strbuf
*buf
);
15 void strbuf_release(struct strbuf
*buf
);
16 void strbuf_clear(struct strbuf
*buf
);
18 /* Destroy buffer and return a copy as a C string */
19 char *strbuf_steal(struct strbuf
*buf
);
22 * Return a C string owned by the buffer invalidated if the buffer is
25 const char *strbuf_str(struct strbuf
*buf
);
27 bool strbuf_pushchar(struct strbuf
*buf
, char ch
);
28 unsigned strbuf_pushchars(struct strbuf
*buf
, const char *str
);
29 void strbuf_popchar(struct strbuf
*buf
);
30 void strbuf_popchars(struct strbuf
*buf
, unsigned n
);