Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_string_ref.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh
index be18848fbf4..8e3e3be99e2 100644
--- a/source/blender/blenlib/BLI_string_ref.hh
+++ b/source/blender/blenlib/BLI_string_ref.hh
@@ -404,6 +404,26 @@ inline bool operator!=(StringRef a, StringRef b)
return !(a == b);
}
+inline bool operator<(StringRef a, StringRef b)
+{
+ return std::string_view(a) < std::string_view(b);
+}
+
+inline bool operator>(StringRef a, StringRef b)
+{
+ return std::string_view(a) > std::string_view(b);
+}
+
+inline bool operator<=(StringRef a, StringRef b)
+{
+ return std::string_view(a) <= std::string_view(b);
+}
+
+inline bool operator>=(StringRef a, StringRef b)
+{
+ return std::string_view(a) >= std::string_view(b);
+}
+
/**
* Return true when the string starts with the given prefix.
*/