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

Unified Diff: corelib/src/string.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/string.dart
===================================================================
--- corelib/src/string.dart (revision 942)
+++ corelib/src/string.dart (working copy)
@@ -47,17 +47,17 @@
/**
* Returns the first location of [other] in this string starting at
- * [startIndex] (inclusive).
+ * [start] (inclusive).
* Returns -1 if [other] could not be found.
*/
- int indexOf(String other, int startIndex);
+ int indexOf(String other, [int start]);
/**
* Returns the last location of [other] in this string, searching
- * backward starting at [fromIndex] (inclusive).
+ * backward starting at [start] (inclusive).
* Returns -1 if [other] could not be found.
*/
- int lastIndexOf(String other, int fromIndex);
+ int lastIndexOf(String other, [int start]);
/**
* Returns whether this string is empty.
@@ -92,7 +92,7 @@
* Returns whether this string contains [other] starting
* at [startIndex] (inclusive).
*/
- bool contains(Pattern other, int startIndex);
+ bool contains(Pattern other, [int startIndex]);
/**
* Returns a new string where the first occurence of [from] in this string

Powered by Google App Engine
This is Rietveld 408576698