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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart

Issue 11368138: Add some support for the code-point code-unit distinction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: New version integrates feedback, adds less to standard String class. Created 8 years, 1 month 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
Index: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 1277851631dd158e3077470901b90d74aedc8073..0806e7ee70927e38b91f797b14f81cf1d739d420 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -168,13 +168,13 @@ patch class _ListImpl<E> {
patch class String {
- patch factory String.fromCharCodes(List<int> charCodes) {
- checkNull(charCodes);
- if (!isJsArray(charCodes)) {
- if (charCodes is !List) throw new ArgumentError(charCodes);
- charCodes = new List.from(charCodes);
+ patch factory String.fromCodeUnits(List<int> codeUnits) {
+ checkNull(codeUnits);
+ if (!isJsArray(codeUnits)) {
+ if (codeUnits is !List) throw new ArgumentError(codeUnits);
+ codeUnits = new List.from(codeUnits);
}
- return Primitives.stringFromCharCodes(charCodes);
+ return Primitives.stringFromCodeUnits(codeUnits);
}
}

Powered by Google App Engine
This is Rietveld 408576698