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

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: DCHECK is silly. 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
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 inline bool operator!=(const String& a, const String& b) { return !equal(a.impl( ), b.impl()); } 432 inline bool operator!=(const String& a, const String& b) { return !equal(a.impl( ), b.impl()); }
433 inline bool operator!=(const String& a, const LChar* b) { return !equal(a.impl() , b); } 433 inline bool operator!=(const String& a, const LChar* b) { return !equal(a.impl() , b); }
434 inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); } 434 inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); }
435 inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.imp l()); } 435 inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.imp l()); }
436 inline bool operator!=(const char* a, const String& b) { return !equal(reinterpr et_cast<const LChar*>(a), b.impl()); } 436 inline bool operator!=(const char* a, const String& b) { return !equal(reinterpr et_cast<const LChar*>(a), b.impl()); }
437 template<size_t inlineCapacity> 437 template<size_t inlineCapacity>
438 inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { return !(a == b); } 438 inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { return !(a == b); }
439 template<size_t inlineCapacity> 439 template<size_t inlineCapacity>
440 inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { return b != a; } 440 inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { return b != a; }
441 441
442 inline bool equalIgnoringCase(const String& a, const String& b) { return equalIg noringCase(a.impl(), b.impl()); }
443 inline bool equalIgnoringCase(const String& a, const LChar* b) { return equalIgn oringCase(a.impl(), b); }
444 inline bool equalIgnoringCase(const String& a, const char* b) { return equalIgno ringCase(a.impl(), reinterpret_cast<const LChar*>(b)); }
445 inline bool equalIgnoringCase(const LChar* a, const String& b) { return equalIgn oringCase(a, b.impl()); }
446 inline bool equalIgnoringCase(const char* a, const String& b) { return equalIgno ringCase(reinterpret_cast<const LChar*>(a), b.impl()); }
447
448 inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ign oreCase) 442 inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ign oreCase)
449 { 443 {
450 return ignoreCase ? equalIgnoringCase(a, b) : (a == b); 444 return ignoreCase ? equalIgnoringCase(a, b) : (a == b);
451 } 445 }
452 446
453 inline bool equalIgnoringNullity(const String& a, const String& b) { return equa lIgnoringNullity(a.impl(), b.impl()); } 447 inline bool equalIgnoringNullity(const String& a, const String& b) { return equa lIgnoringNullity(a.impl(), b.impl()); }
454 448
455 template<size_t inlineCapacity> 449 template<size_t inlineCapacity>
456 inline bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, const S tring& b) { return equalIgnoringNullity(a, b.impl()); } 450 inline bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, const S tring& b) { return equalIgnoringNullity(a, b.impl()); }
457 451
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 using WTF::CString; 610 using WTF::CString;
617 using WTF::KeepTrailingZeros; 611 using WTF::KeepTrailingZeros;
618 using WTF::StrictUTF8Conversion; 612 using WTF::StrictUTF8Conversion;
619 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; 613 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD;
620 using WTF::String; 614 using WTF::String;
621 using WTF::emptyString; 615 using WTF::emptyString;
622 using WTF::emptyString16Bit; 616 using WTF::emptyString16Bit;
623 using WTF::append; 617 using WTF::append;
624 using WTF::charactersAreAllASCII; 618 using WTF::charactersAreAllASCII;
625 using WTF::equal; 619 using WTF::equal;
626 using WTF::equalIgnoringCase;
627 using WTF::find; 620 using WTF::find;
628 using WTF::isAllSpecialCharacters; 621 using WTF::isAllSpecialCharacters;
629 using WTF::isSpaceOrNewline; 622 using WTF::isSpaceOrNewline;
630 using WTF::reverseFind; 623 using WTF::reverseFind;
631 624
632 #include "wtf/text/AtomicString.h" 625 #include "wtf/text/AtomicString.h"
633 #endif // WTFString_h 626 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698