Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354393

Summary: Expect string.indexOf to return 0 if string not found
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Matt Heitz <mheitz>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-10 11:22:01 EDT
If indexOf doesn't find value, I expect to get 0 not -1.  If the string is at the start of the string, I expect 1 not 0.
Comment 1 Matt Heitz CLA 2011-08-10 16:28:07 EDT
I adjusted the functions in EString to account for EGL's 1-based offsets and Java's 0-based offsets.  Changed functions indexOf, lastIndexOf, and charCodeAt.
Comment 2 Kathy Carroll CLA 2011-08-15 14:55:36 EDT
verified
Comment 3 Lisa Lasher CLA 2011-10-11 16:23:46 EDT
Closing this defect.