StringView should have find(StringView, start).
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 18:57:00 +0000 (18:57 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 18:57:00 +0000 (18:57 +0000)
commit5e745076b9a4ff6a980bd83905765f709f59165d
treed1da8affb541d53ce1fd99cf530a15f172bf1f10
parent737c48e7fef93bfdba8876c1e050ab5384e57a22
StringView should have find(StringView, start).
<https://webkit.org/b/145351>

Reviewed by Darin Adler.

Move the class agnostic guts of StringImpl's find() implementation from StringImpl
to StringCommon.h and templatize the code into a findCommon() helper.

StringImpl::find() and StringView::find() now both call findCommon().

* wtf/text/StringCommon.h:
(WTF::findInner):
(WTF::find):
(WTF::findCommon):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::findInner): Deleted.
* wtf/text/StringImpl.h:
(WTF::find): Deleted.
* wtf/text/StringView.cpp:
(WTF::StringView::find):
* wtf/text/StringView.h:

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