summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public/WebCString.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public/WebCString.h')
-rw-r--r--WebKit/chromium/public/WebCString.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebKit/chromium/public/WebCString.h b/WebKit/chromium/public/WebCString.h
index d24916b..2c1e137 100644
--- a/WebKit/chromium/public/WebCString.h
+++ b/WebKit/chromium/public/WebCString.h
@@ -68,6 +68,11 @@ public:
return *this;
}
+ // Returns 0 if both strings are equals, a value greater than zero if the
+ // first character that does not match has a greater value in this string
+ // than in |other|, or a value less than zero to indicate the opposite.
+ WEBKIT_API int compare(const WebCString& other) const;
+
WEBKIT_API void reset();
WEBKIT_API void assign(const WebCString&);
WEBKIT_API void assign(const char* data, size_t len);
@@ -117,6 +122,11 @@ private:
WebCStringPrivate* m_private;
};
+inline bool operator<(const WebCString& a, const WebCString& b)
+{
+ return a.compare(b) < 0;
+}
+
} // namespace WebKit
#endif