Chromium Code Reviews| Index: Source/core/platform/chromium/support/WebString.cpp |
| diff --git a/Source/core/platform/chromium/support/WebString.cpp b/Source/core/platform/chromium/support/WebString.cpp |
| index 4b5dd6b5150a70ab631a9f766e4d8746c1b78cb3..e53f739137acbe3f1f90ed838e71bdd18549db77 100644 |
| --- a/Source/core/platform/chromium/support/WebString.cpp |
| +++ b/Source/core/platform/chromium/support/WebString.cpp |
| @@ -96,6 +96,22 @@ WebString WebString::fromUTF8(const char* data) |
| return WTF::String::fromUTF8(data); |
| } |
| +std::string WebString::latin1() const |
| +{ |
| + WebCString latin1 = WTF::String(m_private.get()).latin1(); |
| + return std::string(latin1.data(), latin1.length()); |
|
abarth-chromium
2013/08/31 18:04:18
WTF:: <--- This prefix isn't needed.
Do you actu
davidben
2013/09/03 15:04:56
Removed. I was just going by the UTF-8 ones which
|
| +} |
| + |
| +WebString WebString::fromLatin1(const char* data, size_t length) |
| +{ |
| + return WTF::String(data, length); |
|
abarth-chromium
2013/08/31 18:04:18
WTF:: <---- No need for this prefix.
davidben
2013/09/03 15:04:56
Done.
|
| +} |
| + |
| +WebString WebString::fromLatin1(const char* data) |
| +{ |
| + return WTF::String(data); |
| +} |
|
abarth-chromium
2013/08/31 18:04:18
Do you actually need this function? If not, we sh
davidben
2013/09/03 15:04:56
Removed.
|
| + |
| bool WebString::equals(const WebString& s) const |
| { |
| return equal(m_private.get(), s.m_private.get()); |