| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights | 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights |
| 4 * reserved. | 4 * reserved. |
| 5 * Copyright (C) 2009 Google Inc. All rights reserved. | 5 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return true; | 592 return true; |
| 593 } | 593 } |
| 594 | 594 |
| 595 ALWAYS_INLINE bool Equal(const UChar* a, const LChar* b, unsigned length) { | 595 ALWAYS_INLINE bool Equal(const UChar* a, const LChar* b, unsigned length) { |
| 596 return Equal(b, a, length); | 596 return Equal(b, a, length); |
| 597 } | 597 } |
| 598 | 598 |
| 599 // Unicode aware case insensitive string matching. Non-ASCII characters might | 599 // Unicode aware case insensitive string matching. Non-ASCII characters might |
| 600 // match to ASCII characters. These functions are rarely used to implement web | 600 // match to ASCII characters. These functions are rarely used to implement web |
| 601 // platform features. | 601 // platform features. |
| 602 WTF_EXPORT bool EqualIgnoringCase(const LChar*, const LChar*, unsigned length); | 602 // These functions are deprecated. Use EqualIgnoringASCIICase(), or introduce |
| 603 WTF_EXPORT bool EqualIgnoringCase(const UChar*, const LChar*, unsigned length); | 603 // EqualIgnoringUnicodeCase(). See crbug.com/627682 |
| 604 inline bool EqualIgnoringCase(const LChar* a, const UChar* b, unsigned length) { | 604 WTF_EXPORT bool DeprecatedEqualIgnoringCase(const LChar*, |
| 605 return EqualIgnoringCase(b, a, length); | 605 const LChar*, |
| 606 unsigned length); |
| 607 WTF_EXPORT bool DeprecatedEqualIgnoringCase(const UChar*, |
| 608 const LChar*, |
| 609 unsigned length); |
| 610 inline bool DeprecatedEqualIgnoringCase(const LChar* a, |
| 611 const UChar* b, |
| 612 unsigned length) { |
| 613 return DeprecatedEqualIgnoringCase(b, a, length); |
| 606 } | 614 } |
| 607 WTF_EXPORT bool EqualIgnoringCase(const UChar*, const UChar*, unsigned length); | 615 WTF_EXPORT bool DeprecatedEqualIgnoringCase(const UChar*, |
| 616 const UChar*, |
| 617 unsigned length); |
| 608 | 618 |
| 609 WTF_EXPORT bool EqualIgnoringNullity(StringImpl*, StringImpl*); | 619 WTF_EXPORT bool EqualIgnoringNullity(StringImpl*, StringImpl*); |
| 610 | 620 |
| 611 template <typename CharacterTypeA, typename CharacterTypeB> | 621 template <typename CharacterTypeA, typename CharacterTypeB> |
| 612 inline bool EqualIgnoringASCIICase(const CharacterTypeA* a, | 622 inline bool EqualIgnoringASCIICase(const CharacterTypeA* a, |
| 613 const CharacterTypeB* b, | 623 const CharacterTypeB* b, |
| 614 unsigned length) { | 624 unsigned length) { |
| 615 for (unsigned i = 0; i < length; ++i) { | 625 for (unsigned i = 0; i < length; ++i) { |
| 616 if (ToASCIILower(a[i]) != ToASCIILower(b[i])) | 626 if (ToASCIILower(a[i]) != ToASCIILower(b[i])) |
| 617 return false; | 627 return false; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 using WTF::kTextCaseASCIIInsensitive; | 898 using WTF::kTextCaseASCIIInsensitive; |
| 889 using WTF::kTextCaseUnicodeInsensitive; | 899 using WTF::kTextCaseUnicodeInsensitive; |
| 890 using WTF::kTextCaseSensitive; | 900 using WTF::kTextCaseSensitive; |
| 891 using WTF::TextCaseSensitivity; | 901 using WTF::TextCaseSensitivity; |
| 892 using WTF::Equal; | 902 using WTF::Equal; |
| 893 using WTF::EqualNonNull; | 903 using WTF::EqualNonNull; |
| 894 using WTF::LengthOfNullTerminatedString; | 904 using WTF::LengthOfNullTerminatedString; |
| 895 using WTF::ReverseFind; | 905 using WTF::ReverseFind; |
| 896 | 906 |
| 897 #endif | 907 #endif |
| OLD | NEW |