commit 9c5e130: [Minor] Add macro to test for zero width spaces

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jan 16 15:07:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-01-16 13:22:37 +0000
URL: https://github.com/rspamd/rspamd/commit/9c5e13042c6ac9d31ab73387e166733677f5b4a3

[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_ */


More information about the Commits mailing list