Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2686)

Unified Diff: corelib/src/list.dart

Issue 8424012: Add optional arguments to our indexOf/lastIndexOf methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: corelib/src/list.dart
===================================================================
--- corelib/src/list.dart (revision 942)
+++ corelib/src/list.dart (working copy)
@@ -76,17 +76,17 @@
/**
* Returns the first index of [element] in this list. Searches this
- * list from index [startIndex] to the length of the list. Returns
+ * list from index [start] to the length of the list. Returns
* -1 if [element] is not found.
*/
- int indexOf(E element, int startIndex);
+ int indexOf(E element, [int start]);
/**
* Returns the last index of [element] in this list. Searches this
- * list from index [startIndex] to 0. Returns -1 if [element] is
- * not found.
+ * list from index [start] (inclusive) to 0. Returns -1 if
+ * [element] is not found.
*/
- int lastIndexOf(E element, int startIndex);
+ int lastIndexOf(E element, [int start]);
/**
* Removes all elements in the list. The length of the list

Powered by Google App Engine
This is Rietveld 408576698