diff options
-rw-r--r-- | source/blender/blenlib/BLI_string_ref.hh | 20 |
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. */ |