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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 static String fromUTF8(const LChar*, size_t); | 416 static String fromUTF8(const LChar*, size_t); |
417 static String fromUTF8(const LChar*); | 417 static String fromUTF8(const LChar*); |
418 static String fromUTF8(const char* s, size_t length) { return fromUTF8(reint
erpret_cast<const LChar*>(s), length); }; | 418 static String fromUTF8(const char* s, size_t length) { return fromUTF8(reint
erpret_cast<const LChar*>(s), length); }; |
419 static String fromUTF8(const char* s) { return fromUTF8(reinterpret_cast<con
st LChar*>(s)); }; | 419 static String fromUTF8(const char* s) { return fromUTF8(reinterpret_cast<con
st LChar*>(s)); }; |
420 static String fromUTF8(const CString&); | 420 static String fromUTF8(const CString&); |
421 | 421 |
422 // Tries to convert the passed in string to UTF-8, but will fall back to Lat
in-1 if the string is not valid UTF-8. | 422 // Tries to convert the passed in string to UTF-8, but will fall back to Lat
in-1 if the string is not valid UTF-8. |
423 static String fromUTF8WithLatin1Fallback(const LChar*, size_t); | 423 static String fromUTF8WithLatin1Fallback(const LChar*, size_t); |
424 static String fromUTF8WithLatin1Fallback(const char* s, size_t length) { ret
urn fromUTF8WithLatin1Fallback(reinterpret_cast<const LChar*>(s), length); }; | 424 static String fromUTF8WithLatin1Fallback(const char* s, size_t length) { ret
urn fromUTF8WithLatin1Fallback(reinterpret_cast<const LChar*>(s), length); }; |
425 | 425 |
426 // Determines the writing direction using the Unicode Bidi Algorithm rules P
2 and P3. | |
427 WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionalit
y = 0) const | |
428 { | |
429 if (m_impl) | |
430 return m_impl->defaultWritingDirection(hasStrongDirectionality); | |
431 if (hasStrongDirectionality) | |
432 *hasStrongDirectionality = false; | |
433 return WTF::Unicode::LeftToRight; | |
434 } | |
435 | |
436 bool containsOnlyASCII() const; | 426 bool containsOnlyASCII() const; |
437 bool containsOnlyLatin1() const; | 427 bool containsOnlyLatin1() const; |
438 bool containsOnlyWhitespace() const { return !m_impl || m_impl->containsOnly
Whitespace(); } | 428 bool containsOnlyWhitespace() const { return !m_impl || m_impl->containsOnly
Whitespace(); } |
439 | 429 |
440 // Hash table deleted values, which are only constructed and never copied or
destroyed. | 430 // Hash table deleted values, which are only constructed and never copied or
destroyed. |
441 String(WTF::HashTableDeletedValueType) : m_impl(WTF::HashTableDeletedValue)
{ } | 431 String(WTF::HashTableDeletedValueType) : m_impl(WTF::HashTableDeletedValue)
{ } |
442 bool isHashTableDeletedValue() const { return m_impl.isHashTableDeletedValue
(); } | 432 bool isHashTableDeletedValue() const { return m_impl.isHashTableDeletedValue
(); } |
443 | 433 |
444 #ifndef NDEBUG | 434 #ifndef NDEBUG |
445 void show() const; | 435 void show() const; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 using WTF::charactersToFloat; | 698 using WTF::charactersToFloat; |
709 using WTF::equal; | 699 using WTF::equal; |
710 using WTF::equalIgnoringCase; | 700 using WTF::equalIgnoringCase; |
711 using WTF::find; | 701 using WTF::find; |
712 using WTF::isAllSpecialCharacters; | 702 using WTF::isAllSpecialCharacters; |
713 using WTF::isSpaceOrNewline; | 703 using WTF::isSpaceOrNewline; |
714 using WTF::reverseFind; | 704 using WTF::reverseFind; |
715 | 705 |
716 #include "wtf/text/AtomicString.h" | 706 #include "wtf/text/AtomicString.h" |
717 #endif | 707 #endif |
OLD | NEW |