Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: runtime/lib/string_patch.dart

Issue 856053002: Let Uint16List.setRange detect a String.codeUnits object, and copy directly from the string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/internal_patch.dart ('k') | runtime/lib/typed_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_patch.dart
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 76950644b18fcd51c9e1b457cd1c1f1a0b68eb97..9d938c5b8d13e2bea417c68297960fac72e78eb3 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -884,7 +884,7 @@ class _StringBase {
return result;
}
- List<int> get codeUnits => new _CodeUnits(this);
+ List<int> get codeUnits => new CodeUnits(this);
Runes get runes => new Runes(this);
@@ -1271,17 +1271,3 @@ class _StringMatch implements Match {
final String input;
final String pattern;
}
-
-/**
- * An [Iterable] of the UTF-16 code units of a [String] in index order.
- */
-class _CodeUnits extends Object with ListMixin<int>,
- UnmodifiableListMixin<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);
-}
« no previous file with comments | « runtime/lib/internal_patch.dart ('k') | runtime/lib/typed_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698