| Index: runtime/lib/string_patch.dart
|
| diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
|
| index 0707a5fdaa91fdfe3aadb824fb138661470385bc..3cdb2a12d37a6433974dcb85c6853c66726a900f 100644
|
| --- a/runtime/lib/string_patch.dart
|
| +++ b/runtime/lib/string_patch.dart
|
| @@ -267,9 +267,12 @@ class _StringBase {
|
|
|
| bool contains(Pattern pattern, [int startIndex = 0]) {
|
| if (pattern is String) {
|
| + if (startIndex < 0 || startIndex > this.length) {
|
| + throw new RangeError.range(startIndex, 0, this.length);
|
| + }
|
| return indexOf(pattern, startIndex) >= 0;
|
| }
|
| - return pattern.allMatches(this.substring(startIndex)).iterator.moveNext();
|
| + return pattern.allMatches(this.substring(startIndex)).isNotEmpty;
|
| }
|
|
|
| String replaceFirst(Pattern pattern, String replacement) {
|
|
|