Index: sdk/lib/core/list.dart |
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart |
index 6740dd53e8faf335b2f36386ec0f0f8258ead7c4..d9e3fc2fa6bd7cc2d53a9e736eae51d77299dd50 100644 |
--- a/sdk/lib/core/list.dart |
+++ b/sdk/lib/core/list.dart |
@@ -214,13 +214,19 @@ abstract class List<E> implements Collection<E> { |
E removeLast(); |
/** |
- * Returns a new list containing [length] elements from the list, |
- * starting at [start]. |
- * Returns an empty list if [length] is 0. |
- * Throws an [ArgumentError] if [length] is negative. |
- * Throws an [RangeError] if [start] or |
- * [:start + length - 1:] are out of range. |
+ * Returns a new list containing the elemenst from [start] to [end]. |
+ * |
+ * If [end] is omitted, the end of the list is used. |
floitsch
2013/03/14 15:46:06
length of the list ?
Lasse Reichstein Nielsen
2013/03/15 09:13:09
Done.
|
+ * |
+ * It is an error if [start] or [end] are not list indices for this list, |
+ * or if [end] is before [start]. |
*/ |
+ List<E> sublist(int start, [int end]); |
+ |
+ /** |
+ * *Deprecated*. Use [sublist] instead. |
+ */ |
+ @deprecated |
List<E> getRange(int start, int length); |
/** |