diff options
Diffstat (limited to 'pjlib/include/pj/hash.h')
-rw-r--r-- | pjlib/include/pj/hash.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pjlib/include/pj/hash.h b/pjlib/include/pj/hash.h index 8e39d652..b1eb9d9f 100644 --- a/pjlib/include/pj/hash.h +++ b/pjlib/include/pj/hash.h @@ -44,6 +44,21 @@ PJ_BEGIN_DECL PJ_DECL(pj_uint32_t) pj_hash_calc(pj_uint32_t hval, const void *key, unsigned keylen); +
+/**
+ * Convert the key to lowercase and calculate the hash value. The resulting
+ * string is stored in \c result.
+ *
+ * @param hval The initial hash value, normally zero.
+ * @param result Buffer to store the result, which must be enough to hold
+ * the string.
+ * @param key The input key to be converted and calculated.
+ *
+ * @return The hash value.
+ */
+PJ_DECL(pj_uint32_t) pj_hash_calc_tolower(pj_uint32_t hval,
+ char *result,
+ const pj_str_t *key);
/** * Create a hash table with the specified 'bucket' size. |