From 9c5e13042c6ac9d31ab73387e166733677f5b4a3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 16 Jan 2019 13:22:37 +0000 Subject: [PATCH] [Minor] Add macro to test for zero width spaces --- src/libutil/str_util.h | 2 ++ 1 file changed, 2 insertions(+) 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_ */ -- 2.39.5