Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/text/WTFString.h |
| diff --git a/third_party/WebKit/Source/wtf/text/WTFString.h b/third_party/WebKit/Source/wtf/text/WTFString.h |
| index f692c9fb859f4c0f78df5f06dea75c9cd632ac03..d8cd17676b9fd4ae79bb4b8ea5eddac1b479cac4 100644 |
| --- a/third_party/WebKit/Source/wtf/text/WTFString.h |
| +++ b/third_party/WebKit/Source/wtf/text/WTFString.h |
| @@ -87,6 +87,7 @@ enum UTF8ConversionMode { |
| #define DISPATCH_CASE_OP(caseSensitivity, op, args) \ |
| ((caseSensitivity == TextCaseSensitive) ? op args : \ |
| + (caseSensitivity == TextCaseASCIIInsensitive) ? op##IgnoringASCIICase args : \ |
|
tkent
2015/12/11 00:02:45
I was afraid the code size bloat by this. However
fs
2015/12/11 11:43:16
Yes, this was how I reasoned about it as well.
|
| op##IgnoringCase args) |
| template<bool isSpecialCharacter(UChar), typename CharacterType> |
| @@ -236,6 +237,10 @@ public: |
| size_t findIgnoringCase(const String& str, unsigned start = 0) const |
| { return m_impl ? m_impl->findIgnoringCase(str.impl(), start) : kNotFound; } |
| + // ASCII case insensitive string matching. |
| + size_t findIgnoringASCIICase(const String& str, unsigned start = 0) const |
| + { return m_impl ? m_impl->findIgnoringASCIICase(str.impl(), start) : kNotFound; } |
| + |
| // Wrappers for find adding dynamic sensitivity check. |
| size_t find(const LChar* str, unsigned start, TextCaseSensitivity caseSensitivity) const |
| { return DISPATCH_CASE_OP(caseSensitivity, find, (str, start)); } |