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

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

Issue 1841143002: Add enum class |WebEditingCommandType| for EditorCommand (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introducing |codePointCompareIgnoringASCIICase()| Created 4 years, 8 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 * 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 reserved. 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 for (unsigned i = 0; i < length; ++i) { 509 for (unsigned i = 0; i < length; ++i) {
510 if (toASCIILower(a[i]) != toASCIILower(b[i])) 510 if (toASCIILower(a[i]) != toASCIILower(b[i]))
511 return false; 511 return false;
512 } 512 }
513 return true; 513 return true;
514 } 514 }
515 515
516 WTF_EXPORT bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*); 516 WTF_EXPORT bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*);
517 WTF_EXPORT bool equalIgnoringASCIICase(const StringImpl*, const LChar*); 517 WTF_EXPORT bool equalIgnoringASCIICase(const StringImpl*, const LChar*);
518 518
519 WTF_EXPORT int codePointCompareIgnoringASCIICase(const StringImpl*, const LChar* );
520
519 template<typename CharacterType> 521 template<typename CharacterType>
520 inline size_t find(const CharacterType* characters, unsigned length, CharacterTy pe matchCharacter, unsigned index = 0) 522 inline size_t find(const CharacterType* characters, unsigned length, CharacterTy pe matchCharacter, unsigned index = 0)
521 { 523 {
522 while (index < length) { 524 while (index < length) {
523 if (characters[index] == matchCharacter) 525 if (characters[index] == matchCharacter)
524 return index; 526 return index;
525 ++index; 527 ++index;
526 } 528 }
527 return kNotFound; 529 return kNotFound;
528 } 530 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 762
761 using WTF::StringImpl; 763 using WTF::StringImpl;
762 using WTF::equal; 764 using WTF::equal;
763 using WTF::equalNonNull; 765 using WTF::equalNonNull;
764 using WTF::TextCaseSensitivity; 766 using WTF::TextCaseSensitivity;
765 using WTF::TextCaseSensitive; 767 using WTF::TextCaseSensitive;
766 using WTF::TextCaseASCIIInsensitive; 768 using WTF::TextCaseASCIIInsensitive;
767 using WTF::TextCaseInsensitive; 769 using WTF::TextCaseInsensitive;
768 770
769 #endif 771 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698