[Webkit-unassigned] [Bug 131704] Simple ES6 feature:String prototype additions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 25 07:14:33 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=131704





--- Comment #20 from Diego Pino <dpino at igalia.com>  2014-08-25 07:14:39 PST ---
I added new methods to WTF::String to support startsWith, endsWith and contains supporting a position parameter.

In the case of contains, it was easy as the underlying implementation already supported this parameter but it was always set to 0.

For the cases of startsWith and endWith I added new methods. I added a new implementation of StringImpl::equalInner to support endOffset and do the comparison using StringImpl, instead of const char*, which is what the other implementation of equalInner uses.

I believe that some of the code for supporting the different implementations of startsWith and endsWith could be refactored, but I think that makes sense to do it in a different patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list