Chromium Code Reviews| Index: runtime/lib/string_patch.dart |
| diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart |
| index ec793067394b7ce24877fd859874b7e07b6a02df..685b704a7568588bbc9871e9ec01ee35583d9019 100644 |
| --- a/runtime/lib/string_patch.dart |
| +++ b/runtime/lib/string_patch.dart |
| @@ -247,6 +247,9 @@ class _StringBase { |
| if (startIndex == endIndex) { |
| return ""; |
| } |
| + if (startIndex == 0 && endIndex == this.length) { |
|
Anders Johnsen
2014/08/05 08:59:25
Put (..) around endIndex == this.length.
Lasse Reichstein Nielsen
2014/08/05 09:26:56
I guess that's the local style.
|
| + return this; |
| + } |
| if ((startIndex + 1) == endIndex) { |
| return this[startIndex]; |
| } |