Chromium Code Reviews| Index: runtime/lib/string_base.dart |
| =================================================================== |
| --- runtime/lib/string_base.dart (revision 15427) |
| +++ runtime/lib/string_base.dart (working copy) |
| @@ -152,6 +152,12 @@ |
| if (startIndex > endIndex) { |
| throw new RangeError.value(startIndex); |
| } |
| + if (startIndex == endIndex) { |
| + return ""; |
| + } |
| + if ((startIndex + 1) == endIndex) { |
| + return this[startIndex]; |
| + } |
| return _substringUnchecked(startIndex, endIndex); |
| } |