summaryrefslogtreecommitdiffstats
path: root/src/libutil/str_util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-27 12:03:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-27 12:03:54 +0000
commit2ad0276a3189c61e673ea716dbd461ac6ee59f87 (patch)
tree45acbd68e2c2e28eeb445c90a61ecbb7689b20a5 /src/libutil/str_util.h
parentdf2fba1c90b25c486d4c33f6c99b2cc2d768063c (diff)
downloadrspamd-2ad0276a3189c61e673ea716dbd461ac6ee59f87.tar.gz
rspamd-2ad0276a3189c61e673ea716dbd461ac6ee59f87.zip
[Minor] Pass variables from the environment to rspamd_env
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r--src/libutil/str_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index 9145b97b4..91efdf187 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -502,4 +502,7 @@ const gchar* rspamd_string_len_strip (const gchar *in,
((uc) >= 0x205F && (uc) <= 0x206F) || \
(uc) == 0xFEFF)
+#define RSPAMD_LEN_CHECK_STARTS_WITH(s, len, lit) \
+ ((len) >= sizeof(lit) - 1 && g_ascii_strncasecmp ((s), (lit), sizeof(lit) - 1) == 0)
+
#endif /* SRC_LIBUTIL_STR_UTIL_H_ */