Closed Bug 458886 Opened 16 years ago Closed 14 years ago

substring treats undefined as null for the second optional parameter

Categories

(Core :: JavaScript Engine, defect)

1.9.0 Branch
x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 373118

People

(Reporter: fredck, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

589 bytes, text/html
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 As per ECMA-262 definition (see p. 105, section 15.5.4.15), if the second parameter of substring is "undefined", it should return the substring to the end of the string. For example: var a; var b = '012345'.subtring( 3 ); // b == '345' In the above example we have b == '012' with Firefox. All other browsers (IE, Safari and Opera) set it to '345'. Reproducible: Always
Attached file TC
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.9.0 Branch
Keywords: testcase
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: