aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/string.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/string.h b/src/zencore/include/zencore/string.h
index cbff6454f..5a12ba5d2 100644
--- a/src/zencore/include/zencore/string.h
+++ b/src/zencore/include/zencore/string.h
@@ -797,6 +797,22 @@ HashStringDjb2(const std::string_view& InString)
}
constexpr uint32_t
+HashStringDjb2(const std::span<const std::string_view> InStrings)
+{
+ uint32_t HashValue = 5381;
+
+ for (const std::string_view& String : InStrings)
+ {
+ for (int CurChar : String)
+ {
+ HashValue = HashValue * 33 + CurChar;
+ }
+ }
+
+ return HashValue;
+}
+
+constexpr uint32_t
HashStringAsLowerDjb2(const std::string_view& InString)
{
uint32_t HashValue = 5381;