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

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: Add include 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..e57c17f9e5d353476abf65a7dc8853ea65dcd67c 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.h
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h
@@ -33,6 +33,7 @@
#include "wtf/text/StringView.h"
#include <algorithm>
#include <iosfwd>
+#include <string>
#ifdef __OBJC__
#include <objc/objc.h>
@@ -179,6 +180,8 @@ public:
CString latin1() const;
CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const;
+ std::string toUTF8() const;
esprehn 2015/09/30 18:15:39 This is confusing with the .utf8() method. I'm als
tkent 2015/10/01 02:09:06 At least, the function should have a document that
Primiano Tucci (use gerrit) 2015/10/01 07:34:51 So, what is the final take? keep it and document?
+
UChar operator[](unsigned index) const
{
if (!m_impl || index >= m_impl->length())

Powered by Google App Engine
This is Rietveld 408576698