Index: sdk/lib/core/string.dart |
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart |
index 0d2503a8e2c89dacaabd1d681dc69b4121432871..3524139e7e44c0cd19798038fa83ccecad422e18 100644 |
--- a/sdk/lib/core/string.dart |
+++ b/sdk/lib/core/string.dart |
@@ -106,8 +106,13 @@ abstract class String implements Comparable<String>, Pattern { |
/** |
* Returns whether this string starts with a match of [pattern]. |
+ * |
+ * If [index] is provided, instead check if the substring starting |
floitsch
2013/06/17 16:07:15
If [index] is provided, checks if `this` starts wi
|
+ * at that index starts with [pattern]. |
+ * |
+ * It is an error if [index] is negative or greater than [length]. |
*/ |
- bool startsWith(Pattern pattern); |
+ bool startsWith(Pattern pattern, [int index = 0]); |
/** |
* Returns the first position of a match of [pattern] in this string, |