diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-21 15:22:30 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-22 15:58:05 +0000 |
commit | 6618db9e85543e95fe1029dd6506204025e4c492 (patch) | |
tree | 2f0e25b41ab6e19131325fed0b9250c0b086e6e5 /src/libutil/str_util.h | |
parent | e7da191495fe9327700900bbd81a8629af8430f5 (diff) | |
download | rspamd-6618db9e85543e95fe1029dd6506204025e4c492.tar.gz rspamd-6618db9e85543e95fe1029dd6506204025e4c492.zip |
[Minor] Add conversion routine for hex strings
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r-- | src/libutil/str_util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h index bc7b4f4b5..1a11daca9 100644 --- a/src/libutil/str_util.h +++ b/src/libutil/str_util.h @@ -130,10 +130,15 @@ rspamd_null_safe_copy (const gchar *src, gsize srclen, gboolean rspamd_strtol (const gchar *s, gsize len, glong *value); /* - * Try to convert string of length to unsigned long + * Try to convert a string of length to unsigned long */ gboolean rspamd_strtoul (const gchar *s, gsize len, gulong *value); +/* + * Try to convert a hex string of length to unsigned long + */ +gboolean rspamd_xstrtoul (const gchar *s, gsize len, gulong *value); + /** * Utility function to provide mem_pool copy for rspamd_hash_table_copy function * @param data string to copy |