2 * Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
4 * Jansson is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
13 int length; /* bytes used */
14 int size; /* bytes allocated */
17 int strbuffer_init(strbuffer_t *strbuff);
18 void strbuffer_close(strbuffer_t *strbuff);
20 void strbuffer_clear(strbuffer_t *strbuff);
22 const char *strbuffer_value(const strbuffer_t *strbuff);
23 char *strbuffer_steal_value(strbuffer_t *strbuff);
25 int strbuffer_append(strbuffer_t *strbuff, const char *string);
26 int strbuffer_append_byte(strbuffer_t *strbuff, char byte);
27 int strbuffer_append_bytes(strbuffer_t *strbuff, const char *data, int size);
29 char strbuffer_pop(strbuffer_t *strbuff);