str.h revision 53e9cbd970106be179f7586151fa4e434f7084f1
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstring_t *str_new(pool_t pool, size_t initial_size);
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch/* Allocate a constant string using the given str as the input data.
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch str pointer is saved directly, so it must not be freed until the returned
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch string is no longer used. len must contain strlen(str). */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstring_t *str_new_const(pool_t pool, const char *str, size_t len);
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstring_t *t_str_new_const(const char *str, size_t len);
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschbool str_equals(const string_t *str1, const string_t *str2) ATTR_PURE;
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline const unsigned char *str_data(const string_t *str)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline size_t str_len(const string_t *str)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschvoid str_append_n(string_t *str, const void *cstr, size_t max_len);
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline void str_append(string_t *str, const char *cstr)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline void str_append_data(string_t *str, const void *data, size_t len)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline void str_append_c(string_t *str, unsigned char chr)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschstatic inline void str_append_str(string_t *dest, const string_t *src)
c911297407bdcc7c7936305eb8f791b450d6375cTimo Sirainen/* Append printf()-like data */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschvoid str_printfa(string_t *str, const char *fmt, ...)