Add String literal overloads to equalIgnoringASCIICase()
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 May 2015 17:55:38 +0000 (17:55 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 May 2015 17:55:38 +0000 (17:55 +0000)
commit8a691e7ecfee5a6bfef975fe21103df27299f4a3
tree8c08c8a5635a41024089d64e5ca86a556fa2aef3
parent562fda11d3159eb89985756ac2f5b8a8c6680d0f
Add String literal overloads to equalIgnoringASCIICase()
https://bugs.webkit.org/show_bug.cgi?id=145008

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-05-14
Reviewed by Benjamin Poulain.

Source/WTF:

Create an overload for equalIgnoringASCIICase for string literals.

* wtf/text/StringImpl.h:
(WTF::equalIgnoringASCIICase): Use a non-templated helper function.
* wtf/text/StringImpl.cpp:
(WTF::equalIgnoringASCIICase): Implement it.
* wtf/text/StringView.h:
(WTF::equalIgnoringASCIICase): Use a non-templated helper function.
* wtf/text/StringView.cpp:
(WTF::equalIgnoringASCIICase): Implement it.
* wtf/text/WTFString.h:
(WTF::equalIgnoringASCIICase): Delegate to StringImpl's implementation.

Tools:

Test changes to WTF.

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(WTF.StringImplEqualIgnoringASCIICaseBasic): Test const char*.
(WTF.StringImplEqualIgnoringASCIICaseWithLatin1Characters): Ditto.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(WTF.StringViewEqualIgnoringASCIICaseBasic): Ditto.
(WTF.StringViewEqualIgnoringASCIICaseWithLatin1Characters): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/StringView.cpp
Source/WTF/wtf/text/StringView.h
Source/WTF/wtf/text/WTFString.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
Tools/TestWebKitAPI/Tests/WTF/StringView.cpp