Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // on systems without case-sensitive file systems. | 26 // on systems without case-sensitive file systems. |
| 27 | 27 |
| 28 #include "wtf/HashTableDeletedValueType.h" | 28 #include "wtf/HashTableDeletedValueType.h" |
| 29 #include "wtf/WTFExport.h" | 29 #include "wtf/WTFExport.h" |
| 30 #include "wtf/testing/WTFUnitTestHelpersExport.h" | 30 #include "wtf/testing/WTFUnitTestHelpersExport.h" |
| 31 #include "wtf/text/ASCIIFastPath.h" | 31 #include "wtf/text/ASCIIFastPath.h" |
| 32 #include "wtf/text/StringImpl.h" | 32 #include "wtf/text/StringImpl.h" |
| 33 #include "wtf/text/StringView.h" | 33 #include "wtf/text/StringView.h" |
| 34 #include <algorithm> | 34 #include <algorithm> |
| 35 #include <iosfwd> | 35 #include <iosfwd> |
| 36 #include <string> | |
| 36 | 37 |
| 37 #ifdef __OBJC__ | 38 #ifdef __OBJC__ |
| 38 #include <objc/objc.h> | 39 #include <objc/objc.h> |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 namespace WTF { | 42 namespace WTF { |
| 42 | 43 |
| 43 class CString; | 44 class CString; |
| 44 struct StringHash; | 45 struct StringHash; |
| 45 | 46 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 { | 173 { |
| 173 if (!m_impl) | 174 if (!m_impl) |
| 174 return 0; | 175 return 0; |
| 175 return m_impl->length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar)); | 176 return m_impl->length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar)); |
| 176 } | 177 } |
| 177 | 178 |
| 178 CString ascii() const; | 179 CString ascii() const; |
| 179 CString latin1() const; | 180 CString latin1() const; |
| 180 CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const; | 181 CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const; |
| 181 | 182 |
| 183 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?
| |
| 184 | |
| 182 UChar operator[](unsigned index) const | 185 UChar operator[](unsigned index) const |
| 183 { | 186 { |
| 184 if (!m_impl || index >= m_impl->length()) | 187 if (!m_impl || index >= m_impl->length()) |
| 185 return 0; | 188 return 0; |
| 186 return (*m_impl)[index]; | 189 return (*m_impl)[index]; |
| 187 } | 190 } |
| 188 | 191 |
| 189 static String number(int); | 192 static String number(int); |
| 190 static String number(unsigned); | 193 static String number(unsigned); |
| 191 static String number(long); | 194 static String number(long); |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 698 using WTF::charactersToFloat; | 701 using WTF::charactersToFloat; |
| 699 using WTF::equal; | 702 using WTF::equal; |
| 700 using WTF::equalIgnoringCase; | 703 using WTF::equalIgnoringCase; |
| 701 using WTF::find; | 704 using WTF::find; |
| 702 using WTF::isAllSpecialCharacters; | 705 using WTF::isAllSpecialCharacters; |
| 703 using WTF::isSpaceOrNewline; | 706 using WTF::isSpaceOrNewline; |
| 704 using WTF::reverseFind; | 707 using WTF::reverseFind; |
| 705 | 708 |
| 706 #include "wtf/text/AtomicString.h" | 709 #include "wtf/text/AtomicString.h" |
| 707 #endif // WTFString_h | 710 #endif // WTFString_h |
| OLD | NEW |