Index: sdk/lib/_collection_dev/list.dart |
diff --git a/sdk/lib/_collection_dev/list.dart b/sdk/lib/_collection_dev/list.dart |
index fe698ec7f0ede4696f309323a1995a2555fe663b..3262e303fded447fcf973444af816d60d263defd 100644 |
--- a/sdk/lib/_collection_dev/list.dart |
+++ b/sdk/lib/_collection_dev/list.dart |
@@ -301,3 +301,16 @@ class ReversedListIterable<E> extends ListIterable<E> { |
E elementAt(int index) => _source.elementAt(_source.length - 1 - index); |
} |
+ |
+/** |
+ * An [Iterable] of the UTF-16 code units of a [String] in index order. |
+ */ |
+class CodeUnits extends UnmodifiableListBase<int> { |
+ /** The string that this is the code units of. */ |
+ String _string; |
+ |
+ CodeUnits(this._string); |
+ |
+ int get length => _string.length; |
+ int operator[](int i) => _string.codeUnitAt(i); |
+} |