Closed
Bug 524912
Opened 15 years ago
Closed 13 years ago
String.indexOf/lastIndexOf methods need toIndex parameter
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: mnyromyr, Unassigned)
Details
String.indexOf/lastIndexOf do take a second parameter to specify where to start searching, but none for where to stop. This is rather inefficient for long strings, because you need to either cut the string before searching or you waste time searching in "uninteresting" string portions. I propose defining an additional toIndex: String.indexOf(searchValue[, fromIndex[, toIndex]]) String.lastIndexOf(searchValue[, fromIndex[, toIndex]])
Reporter | ||
Updated•15 years ago
|
Summary: String.indexOf/lastIndexOf methods needs endIndex parameter → String.indexOf/lastIndexOf methods need toIndex parameter
Comment 1•15 years ago
|
||
I suggest proposing this to es-discuss: https://mail.mozilla.org/listinfo/es-discuss
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 2•13 years ago
|
||
Tom, care to elaborate?
Comment 3•13 years ago
|
||
We implement what ECMA specifies, so before we'll implement it, ECMA has to support it. Hence comment 1.
You need to log in
before you can comment on or make changes to this bug.
Description
•