aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/str_util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-17 14:57:24 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-17 14:57:24 +0000
commit9cd6c30cd0fb6c8c1189d1cddeb1d52d4e687251 (patch)
treed7a593cba4d30c7343fb876b716943673d2a92b5 /src/libutil/str_util.h
parent497ac2e3ef56ca9f43a5f59e46a196267d56c811 (diff)
downloadrspamd-9cd6c30cd0fb6c8c1189d1cddeb1d52d4e687251.tar.gz
rspamd-9cd6c30cd0fb6c8c1189d1cddeb1d52d4e687251.zip
[Minor] Core: Add function to strip characters in gstring
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r--src/libutil/str_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 059665388..a2669d1a0 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -447,6 +447,13 @@ rspamd_str_regexp_escape (const gchar *pattern, gsize slen,
*/
gchar * rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen);
+/**
+ * Strips characters in `strip_chars` from start and end of the GString
+ * @param s
+ * @param strip_chars
+ */
+gsize rspamd_gstring_strip (GString *s, const gchar *strip_chars);
+
#define IS_ZERO_WIDTH_SPACE(uc) ((uc) == 0x200b || (uc) == 0x200c)
#endif /* SRC_LIBUTIL_STR_UTIL_H_ */