diff options
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r-- | src/libutil/fstring.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/fstring.h b/src/libutil/fstring.h index 5ca74f457..d3b51821f 100644 --- a/src/libutil/fstring.h +++ b/src/libutil/fstring.h @@ -80,6 +80,11 @@ void rspamd_fstring_free (rspamd_fstring_t *str); rspamd_fstring_t* rspamd_fstring_append (rspamd_fstring_t *str, const char *in, gsize len) G_GNUC_WARN_UNUSED_RESULT; +/** + * Append `len` repeated chars `c` to string `str` + */ +rspamd_fstring_t *rspamd_fstring_append_chars (rspamd_fstring_t *str, + char c, gsize len) G_GNUC_WARN_UNUSED_RESULT; /** * Erase `len` characters at postion `pos` @@ -138,4 +143,9 @@ gint rspamd_ftok_cmp (const rspamd_ftok_t *s1, */ void rspamd_fstring_mapped_ftok_free (gpointer p); +/** + * Map token to a specified string. Token must be freed using g_slice_free1 + */ +rspamd_ftok_t *rspamd_ftok_map (const rspamd_fstring_t *s); + #endif |