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
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 size_t findNextLineStart(unsigned index = UINT_MAX); | 378 size_t findNextLineStart(unsigned index = UINT_MAX); |
379 | 379 |
380 size_t reverseFind(UChar, unsigned index = UINT_MAX); | 380 size_t reverseFind(UChar, unsigned index = UINT_MAX); |
381 size_t reverseFind(StringImpl*, unsigned index = UINT_MAX); | 381 size_t reverseFind(StringImpl*, unsigned index = UINT_MAX); |
382 size_t reverseFindIgnoringCase(StringImpl*, unsigned index = UINT_MAX); | 382 size_t reverseFindIgnoringCase(StringImpl*, unsigned index = UINT_MAX); |
383 | 383 |
384 size_t count(LChar) const; | 384 size_t count(LChar) const; |
385 | 385 |
386 bool startsWith(StringImpl* str, TextCaseSensitivity caseSensitivity = TextC
aseSensitive) { return ((caseSensitivity == TextCaseSensitive) ? reverseFind(str
, 0) : reverseFindIgnoringCase(str, 0)) == 0; } | 386 bool startsWith(StringImpl* str, TextCaseSensitivity caseSensitivity = TextC
aseSensitive) { return ((caseSensitivity == TextCaseSensitive) ? reverseFind(str
, 0) : reverseFindIgnoringCase(str, 0)) == 0; } |
387 bool startsWith(UChar) const; | 387 bool startsWith(UChar) const; |
388 bool startsWith(const char*, unsigned matchLength, TextCaseSensitivity) cons
t; | 388 bool startsWith(const char*, unsigned matchLength) const; |
389 template<unsigned matchLength> | |
390 bool startsWith(const char (&prefix)[matchLength], TextCaseSensitivity caseS
ensitivity = TextCaseSensitive) const { return startsWith(prefix, matchLength -
1, caseSensitivity); } | |
391 | 389 |
392 bool endsWith(StringImpl*, TextCaseSensitivity = TextCaseSensitive); | 390 bool endsWith(StringImpl*, TextCaseSensitivity = TextCaseSensitive); |
393 bool endsWith(UChar) const; | 391 bool endsWith(UChar) const; |
394 bool endsWith(const char*, unsigned matchLength, TextCaseSensitivity) const; | 392 bool endsWith(const char*, unsigned matchLength) const; |
395 template<unsigned matchLength> | |
396 bool endsWith(const char (&prefix)[matchLength], TextCaseSensitivity caseSen
sitivity = TextCaseSensitive) const { return endsWith(prefix, matchLength - 1, c
aseSensitivity); } | |
397 | 393 |
398 PassRefPtr<StringImpl> replace(UChar, UChar); | 394 PassRefPtr<StringImpl> replace(UChar, UChar); |
399 PassRefPtr<StringImpl> replace(UChar, StringImpl*); | 395 PassRefPtr<StringImpl> replace(UChar, StringImpl*); |
400 ALWAYS_INLINE PassRefPtr<StringImpl> replace(UChar pattern, const char* repl
acement, unsigned replacementLength) { return replace(pattern, reinterpret_cast<
const LChar*>(replacement), replacementLength); } | 396 ALWAYS_INLINE PassRefPtr<StringImpl> replace(UChar pattern, const char* repl
acement, unsigned replacementLength) { return replace(pattern, reinterpret_cast<
const LChar*>(replacement), replacementLength); } |
401 PassRefPtr<StringImpl> replace(UChar, const LChar*, unsigned replacementLeng
th); | 397 PassRefPtr<StringImpl> replace(UChar, const LChar*, unsigned replacementLeng
th); |
402 PassRefPtr<StringImpl> replace(UChar, const UChar*, unsigned replacementLeng
th); | 398 PassRefPtr<StringImpl> replace(UChar, const UChar*, unsigned replacementLeng
th); |
403 PassRefPtr<StringImpl> replace(StringImpl*, StringImpl*); | 399 PassRefPtr<StringImpl> replace(StringImpl*, StringImpl*); |
404 PassRefPtr<StringImpl> replace(unsigned index, unsigned len, StringImpl*); | 400 PassRefPtr<StringImpl> replace(unsigned index, unsigned len, StringImpl*); |
405 PassRefPtr<StringImpl> upconvertedString(); | 401 PassRefPtr<StringImpl> upconvertedString(); |
406 | 402 |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 } | 764 } |
769 | 765 |
770 using WTF::StringImpl; | 766 using WTF::StringImpl; |
771 using WTF::equal; | 767 using WTF::equal; |
772 using WTF::equalNonNull; | 768 using WTF::equalNonNull; |
773 using WTF::TextCaseSensitivity; | 769 using WTF::TextCaseSensitivity; |
774 using WTF::TextCaseSensitive; | 770 using WTF::TextCaseSensitive; |
775 using WTF::TextCaseInsensitive; | 771 using WTF::TextCaseInsensitive; |
776 | 772 |
777 #endif | 773 #endif |
OLD | NEW |