diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-23 12:23:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-23 12:23:52 +0100 |
commit | f0d7449414c8271fa4c232949ce9b57f32818562 (patch) | |
tree | 1b9c2e3950ef02c7615400105a806c34423268be /src/libutil/str_util.h | |
parent | 305de55ddaf9cd50e77dab247f433bf657f1c98d (diff) | |
download | rspamd-f0d7449414c8271fa4c232949ce9b57f32818562.tar.gz rspamd-f0d7449414c8271fa4c232949ce9b57f32818562.zip |
[Feature] Add rspamd_memrchr utility function
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r-- | src/libutil/str_util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h index 1ae09f576..91c80ff5d 100644 --- a/src/libutil/str_util.h +++ b/src/libutil/str_util.h @@ -310,4 +310,13 @@ gboolean rspamd_urls_cmp (gconstpointer a, gconstpointer b); extern const guchar lc_map[256]; +/** + * Search for the last occurrence of character `c` in memory block of size `len` + * @param m + * @param c + * @param len + * @return pointer to the last occurrence or NULL + */ +const void *rspamd_memrchr (const void *m, gint c, gsize len); + #endif /* SRC_LIBUTIL_STR_UTIL_H_ */ |