diff options
Diffstat (limited to 'WebKit/chromium/src/WebCString.cpp')
| -rw-r--r-- | WebKit/chromium/src/WebCString.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKit/chromium/src/WebCString.cpp b/WebKit/chromium/src/WebCString.cpp index b484b19..f81d7f4 100644 --- a/WebKit/chromium/src/WebCString.cpp +++ b/WebKit/chromium/src/WebCString.cpp @@ -41,6 +41,18 @@ namespace WebKit { class WebCStringPrivate : public WTF::CStringBuffer { }; +int WebCString::compare(const WebCString& other) const +{ + // A null string is always less than a non null one. + if (isNull() != other.isNull()) + return isNull() ? -1 : 1; + + if (isNull()) + return 0; // Both WebStrings are null. + + return strcmp(m_private->data(), other.m_private->data()); +} + void WebCString::reset() { if (m_private) { |
