aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-16 13:22:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-16 13:22:37 +0000
commit9c5e13042c6ac9d31ab73387e166733677f5b4a3 (patch)
treea7d5d3b371c4ee6b3f7454a8e0e2a6aa89b281d2
parentae8f1997198be36340efb8a1d291e0339b1486c3 (diff)
downloadrspamd-9c5e13042c6ac9d31ab73387e166733677f5b4a3.tar.gz
rspamd-9c5e13042c6ac9d31ab73387e166733677f5b4a3.zip
[Minor] Add macro to test for zero width spaces
-rw-r--r--src/libutil/str_util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 935c5116d..742d34184 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -439,4 +439,6 @@ rspamd_str_regexp_escape (const gchar *pattern, gsize slen,
*/
gchar * rspamd_str_make_utf_valid (const gchar *src, gsize slen, gsize *dstlen);
+#define IS_ZERO_WIDTH_SPACE(uc) ((uc) == 0x200b || (uc) == 0x200c)
+
#endif /* SRC_LIBUTIL_STR_UTIL_H_ */