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

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

Issue 1523463004: Restore TextCaseSensitivity argument to literal {start,end}sWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/StringImpl.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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 template<typename CharacterType> 263 template<typename CharacterType>
264 bool contains(CharacterType c) const { return find(c) != kNotFound; } 264 bool contains(CharacterType c) const { return find(c) != kNotFound; }
265 bool contains(const LChar* str, TextCaseSensitivity caseSensitivity = TextCa seSensitive) const { return find(str, 0, caseSensitivity) != kNotFound; } 265 bool contains(const LChar* str, TextCaseSensitivity caseSensitivity = TextCa seSensitive) const { return find(str, 0, caseSensitivity) != kNotFound; }
266 bool contains(const String& str, TextCaseSensitivity caseSensitivity = TextC aseSensitive) const { return find(str, 0, caseSensitivity) != kNotFound; } 266 bool contains(const String& str, TextCaseSensitivity caseSensitivity = TextC aseSensitive) const { return find(str, 0, caseSensitivity) != kNotFound; }
267 267
268 bool startsWith(const String& s, TextCaseSensitivity caseSensitivity = TextC aseSensitive) const 268 bool startsWith(const String& s, TextCaseSensitivity caseSensitivity = TextC aseSensitive) const
269 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->startsWith, (s.impl())) : s.isEmpty(); } 269 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->startsWith, (s.impl())) : s.isEmpty(); }
270 bool startsWith(UChar character) const 270 bool startsWith(UChar character) const
271 { return m_impl ? m_impl->startsWith(character) : false; } 271 { return m_impl ? m_impl->startsWith(character) : false; }
272 template<unsigned matchLength> 272 template<unsigned matchLength>
273 bool startsWith(const char (&prefix)[matchLength]) const 273 bool startsWith(const char (&prefix)[matchLength], TextCaseSensitivity caseS ensitivity = TextCaseSensitive) const
274 { return m_impl ? m_impl->startsWith(prefix, matchLength - 1) : !matchLe ngth; } 274 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->startsWith, (prefix, matchLength - 1)) : !matchLength; }
275 275
276 bool endsWith(const String& s, TextCaseSensitivity caseSensitivity = TextCas eSensitive) const 276 bool endsWith(const String& s, TextCaseSensitivity caseSensitivity = TextCas eSensitive) const
277 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->endsWith, (s .impl())) : s.isEmpty(); } 277 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->endsWith, (s .impl())) : s.isEmpty(); }
278 bool endsWith(UChar character) const 278 bool endsWith(UChar character) const
279 { return m_impl ? m_impl->endsWith(character) : false; } 279 { return m_impl ? m_impl->endsWith(character) : false; }
280 template<unsigned matchLength> 280 template<unsigned matchLength>
281 bool endsWith(const char (&prefix)[matchLength]) const 281 bool endsWith(const char (&prefix)[matchLength], TextCaseSensitivity caseSen sitivity = TextCaseSensitive) const
282 { return m_impl ? m_impl->endsWith(prefix, matchLength - 1) : !matchLeng th; } 282 { return m_impl ? DISPATCH_CASE_OP(caseSensitivity, m_impl->endsWith, (p refix, matchLength - 1)) : !matchLength; }
283 283
284 void append(const String&); 284 void append(const String&);
285 void append(LChar); 285 void append(LChar);
286 void append(char c) { append(static_cast<LChar>(c)); } 286 void append(char c) { append(static_cast<LChar>(c)); }
287 void append(UChar); 287 void append(UChar);
288 void append(const LChar*, unsigned length); 288 void append(const LChar*, unsigned length);
289 void append(const char* charactersToAppend, unsigned length) { append(reinte rpret_cast<const LChar*>(charactersToAppend), length); } 289 void append(const char* charactersToAppend, unsigned length) { append(reinte rpret_cast<const LChar*>(charactersToAppend), length); }
290 void append(const UChar*, unsigned length); 290 void append(const UChar*, unsigned length);
291 void insert(const String&, unsigned pos); 291 void insert(const String&, unsigned pos);
292 void insert(const LChar*, unsigned length, unsigned pos); 292 void insert(const LChar*, unsigned length, unsigned pos);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 using WTF::charactersToFloat; 700 using WTF::charactersToFloat;
701 using WTF::equal; 701 using WTF::equal;
702 using WTF::equalIgnoringCase; 702 using WTF::equalIgnoringCase;
703 using WTF::find; 703 using WTF::find;
704 using WTF::isAllSpecialCharacters; 704 using WTF::isAllSpecialCharacters;
705 using WTF::isSpaceOrNewline; 705 using WTF::isSpaceOrNewline;
706 using WTF::reverseFind; 706 using WTF::reverseFind;
707 707
708 #include "wtf/text/AtomicString.h" 708 #include "wtf/text/AtomicString.h"
709 #endif // WTFString_h 709 #endif // WTFString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698