summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-string.h')
-rw-r--r--source/core/slang-string.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 3da0db6b9..6d84a0c95 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -218,6 +218,14 @@ protected:
char const* m_end;
};
+/// Three-way comparison of string slices.
+///
+/// * Returns 0 if `lhs == rhs`
+/// * Returns a value < 0 if `lhs < rhs`
+/// * Returns a value > 0 if `lhs > rhs`
+///
+int compare(UnownedStringSlice const& lhs, UnownedStringSlice const& rhs);
+
// A more convenient way to make slices from *string literals*
template<size_t SIZE>
SLANG_FORCE_INLINE UnownedStringSlice toSlice(const char (&in)[SIZE])