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

Side by Side Diff: third_party/WebKit/Source/wtf/text/WTFString.h

Issue 2148423003: Use StringView for equalIgnoringCase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add rebaselines. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 inline bool operator!=(const String& a, const String& b) { return !equal(a.impl( ), b.impl()); } 436 inline bool operator!=(const String& a, const String& b) { return !equal(a.impl( ), b.impl()); }
437 inline bool operator!=(const String& a, const LChar* b) { return !equal(a.impl() , b); } 437 inline bool operator!=(const String& a, const LChar* b) { return !equal(a.impl() , b); }
438 inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); } 438 inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); }
439 inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.imp l()); } 439 inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.imp l()); }
440 inline bool operator!=(const char* a, const String& b) { return !equal(reinterpr et_cast<const LChar*>(a), b.impl()); } 440 inline bool operator!=(const char* a, const String& b) { return !equal(reinterpr et_cast<const LChar*>(a), b.impl()); }
441 template<size_t inlineCapacity> 441 template<size_t inlineCapacity>
442 inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { return !(a == b); } 442 inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { return !(a == b); }
443 template<size_t inlineCapacity> 443 template<size_t inlineCapacity>
444 inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { return b != a; } 444 inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { return b != a; }
445 445
446 inline bool equalIgnoringCase(const String& a, const String& b) { return equalIg noringCase(a.impl(), b.impl()); }
447 inline bool equalIgnoringCase(const String& a, const LChar* b) { return equalIgn oringCase(a.impl(), b); }
448 inline bool equalIgnoringCase(const String& a, const char* b) { return equalIgno ringCase(a.impl(), reinterpret_cast<const LChar*>(b)); }
449 inline bool equalIgnoringCase(const LChar* a, const String& b) { return equalIgn oringCase(a, b.impl()); }
450 inline bool equalIgnoringCase(const char* a, const String& b) { return equalIgno ringCase(reinterpret_cast<const LChar*>(a), b.impl()); }
451
452 inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ign oreCase) 446 inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ign oreCase)
453 { 447 {
454 return ignoreCase ? equalIgnoringCase(a, b) : (a == b); 448 return ignoreCase ? equalIgnoringCase(a, b) : (a == b);
455 } 449 }
456 450
457 inline bool equalIgnoringNullity(const String& a, const String& b) { return equa lIgnoringNullity(a.impl(), b.impl()); } 451 inline bool equalIgnoringNullity(const String& a, const String& b) { return equa lIgnoringNullity(a.impl(), b.impl()); }
458 452
459 template<size_t inlineCapacity> 453 template<size_t inlineCapacity>
460 inline bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, const S tring& b) { return equalIgnoringNullity(a, b.impl()); } 454 inline bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, const S tring& b) { return equalIgnoringNullity(a, b.impl()); }
461 455
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 using WTF::CString; 635 using WTF::CString;
642 using WTF::KeepTrailingZeros; 636 using WTF::KeepTrailingZeros;
643 using WTF::StrictUTF8Conversion; 637 using WTF::StrictUTF8Conversion;
644 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; 638 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD;
645 using WTF::String; 639 using WTF::String;
646 using WTF::emptyString; 640 using WTF::emptyString;
647 using WTF::emptyString16Bit; 641 using WTF::emptyString16Bit;
648 using WTF::append; 642 using WTF::append;
649 using WTF::charactersAreAllASCII; 643 using WTF::charactersAreAllASCII;
650 using WTF::equal; 644 using WTF::equal;
651 using WTF::equalIgnoringCase;
652 using WTF::find; 645 using WTF::find;
653 using WTF::isAllSpecialCharacters; 646 using WTF::isAllSpecialCharacters;
654 using WTF::isSpaceOrNewline; 647 using WTF::isSpaceOrNewline;
655 using WTF::reverseFind; 648 using WTF::reverseFind;
656 649
657 #include "wtf/text/AtomicString.h" 650 #include "wtf/text/AtomicString.h"
658 #endif // WTFString_h 651 #endif // WTFString_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698