summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-string.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index df1055795..fb60ef562 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -137,6 +137,11 @@ namespace Slang
bool endsWith(UnownedStringSlice const& other) const;
bool endsWith(char const* str) const;
+ int GetHashCode() const
+ {
+ return Slang::GetHashCode(beginData, size_t(endData - beginData));
+ }
+
template <size_t SIZE>
SLANG_FORCE_INLINE static UnownedStringSlice fromLiteral(const char (&in)[SIZE]) { return UnownedStringSlice(in, SIZE - 1); }