aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/String.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-08-13 15:24:39 +0800
committercrupest <crupest@outlook.com>2021-08-13 15:24:39 +0800
commit202e9feed09f7cb7d41c004d414283b262a95204 (patch)
tree7d36a349452bfd172ec8e27a389c0e0cedab2f97 /include/cru/common/String.hpp
parent2e379441f69c4fd3049d186f76b25457e6250282 (diff)
downloadcru-202e9feed09f7cb7d41c004d414283b262a95204.tar.gz
cru-202e9feed09f7cb7d41c004d414283b262a95204.tar.bz2
cru-202e9feed09f7cb7d41c004d414283b262a95204.zip
...
Diffstat (limited to 'include/cru/common/String.hpp')
-rw-r--r--include/cru/common/String.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/common/String.hpp b/include/cru/common/String.hpp
index e779e3a6..c8defd13 100644
--- a/include/cru/common/String.hpp
+++ b/include/cru/common/String.hpp
@@ -139,6 +139,8 @@ class CRU_BASE_API String {
std::string ToUtf8() const;
+ int Compare(const String& other) const;
+
private:
static std::uint16_t kEmptyBuffer[1];
@@ -147,4 +149,7 @@ class CRU_BASE_API String {
Index size_ = 0; // not including trailing '\0'
Index capacity_ = 0; // always 1 smaller than real buffer size
};
+
+CRU_DEFINE_COMPARE_OPERATORS(String)
+
} // namespace cru