Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: third_party/WebKit/Source/wtf/text/WTFString.h

Issue 1382583002: Add toStdString methods to CString and WTF::String (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/text/WTFString.h
diff --git a/third_party/WebKit/Source/wtf/text/WTFString.h b/third_party/WebKit/Source/wtf/text/WTFString.h
index 256abc6a131a9904461570997cf74da03650d099..b2ee6852357237905b3e7909135cd467b2389b43 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.h
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h
@@ -179,6 +179,8 @@ public:
CString latin1() const;
CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const;
+ std::string toUTF8() const;
Mikhail 2015/09/30 14:02:01 why not toStdString() ?
Primiano Tucci (use gerrit) 2015/09/30 15:08:28 AFAIK technically speaking std::string does not ma
Mikhail 2015/09/30 15:58:39 Agree, however having both 'CString utf8()' and 's
Primiano Tucci (use gerrit) 2015/09/30 16:03:37 Hmm ok for the StdString part, but I'd keep the to
+
UChar operator[](unsigned index) const
{
if (!m_impl || index >= m_impl->length())

Powered by Google App Engine
This is Rietveld 408576698