Chromium Code Reviews| Index: public/platform/WebString.h |
| diff --git a/public/platform/WebString.h b/public/platform/WebString.h |
| index 7d607d77d708a5b0b1147aa02de8af091bc38826..81809f9aaad4dcc0a2f82c88b78f93539eece66d 100644 |
| --- a/public/platform/WebString.h |
| +++ b/public/platform/WebString.h |
| @@ -33,6 +33,7 @@ |
| #include "WebCommon.h" |
| #include "WebPrivatePtr.h" |
| +#include <string> |
| #if INSIDE_WEBKIT |
| #include <wtf/Forward.h> |
| @@ -79,6 +80,7 @@ public: |
| BLINK_COMMON_EXPORT void assign(const WebUChar* data, size_t len); |
| BLINK_COMMON_EXPORT bool equals(const WebString&) const; |
| + BLINK_COMMON_EXPORT bool lessThan(const WebString&) const; |
| BLINK_COMMON_EXPORT size_t length() const; |
| @@ -89,6 +91,7 @@ public: |
| bool isNull() const { return m_private.isNull(); } |
| BLINK_COMMON_EXPORT WebCString utf8() const; |
| + BLINK_COMMON_EXPORT std::string toUTF8String() const; |
|
abarth-chromium
2013/07/24 21:59:10
I'm not super happy with this name... Open to sug
Jeffrey Yasskin
2013/07/24 22:23:20
It would be clearer if it mentioned "std", but it
|
| BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data, size_t length); |
| BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data); |
| @@ -169,6 +172,11 @@ private: |
| WebPrivatePtr<WTF::StringImpl> m_private; |
| }; |
| +inline bool operator<(const WebString& a, const WebString& b) |
| +{ |
| + return a.lessThan(b); |
| +} |
| + |
| inline bool operator==(const WebString& a, const WebString& b) |
| { |
| return a.equals(b); |