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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 18 16:40:12 PDT 2014


--- Comment #11 from Diego Pino <dpino at igalia.com>  2014-08-18 16:40:19 PST ---
(From update of attachment 236762)
View in context: https://bugs.webkit.org/attachment.cgi?id=236762&action=review

>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1581
>> +    for (uint32_t i = start, j = 0; j < searchLength; i++, j++) {
> Why do this a character at a time instead of using WTF::String::startsWith? If WTF::String::startsWith is missing some features, we could add them.

The reason is that WTF::String::startsWith doesn't support a starting position, same as endsWith (doesn't support an endPosition) and contains (doesn't support a starting position). I can add new methods to WTF:String for supporting a second parameter indicating position for these methods and rely the implementation of String.prototype.startsWith on WTF:String::startsWith (same for endsWith and contains).

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