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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 { | 172 { |
173 if (!m_impl) | 173 if (!m_impl) |
174 return 0; | 174 return 0; |
175 return m_impl->length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar)); | 175 return m_impl->length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar)); |
176 } | 176 } |
177 | 177 |
178 CString ascii() const; | 178 CString ascii() const; |
179 CString latin1() const; | 179 CString latin1() const; |
180 CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const; | 180 CString utf8(UTF8ConversionMode = LenientUTF8Conversion) const; |
181 | 181 |
182 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
| |
183 | |
182 UChar operator[](unsigned index) const | 184 UChar operator[](unsigned index) const |
183 { | 185 { |
184 if (!m_impl || index >= m_impl->length()) | 186 if (!m_impl || index >= m_impl->length()) |
185 return 0; | 187 return 0; |
186 return (*m_impl)[index]; | 188 return (*m_impl)[index]; |
187 } | 189 } |
188 | 190 |
189 static String number(int); | 191 static String number(int); |
190 static String number(unsigned); | 192 static String number(unsigned); |
191 static String number(long); | 193 static String number(long); |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
698 using WTF::charactersToFloat; | 700 using WTF::charactersToFloat; |
699 using WTF::equal; | 701 using WTF::equal; |
700 using WTF::equalIgnoringCase; | 702 using WTF::equalIgnoringCase; |
701 using WTF::find; | 703 using WTF::find; |
702 using WTF::isAllSpecialCharacters; | 704 using WTF::isAllSpecialCharacters; |
703 using WTF::isSpaceOrNewline; | 705 using WTF::isSpaceOrNewline; |
704 using WTF::reverseFind; | 706 using WTF::reverseFind; |
705 | 707 |
706 #include "wtf/text/AtomicString.h" | 708 #include "wtf/text/AtomicString.h" |
707 #endif // WTFString_h | 709 #endif // WTFString_h |
OLD | NEW |