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

Unified Diff: sdk/lib/utf/utf32.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: Implemented feedback from patch set 3 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/utf/utf32.dart
diff --git a/sdk/lib/utf/utf32.dart b/sdk/lib/utf/utf32.dart
index 9cbfd7aa982e14aabd5262ad3c3c6ac2257b1236..f79e45243342f2786da556eee9567dce8b6fe204 100644
--- a/sdk/lib/utf/utf32.dart
+++ b/sdk/lib/utf/utf32.dart
@@ -96,7 +96,7 @@ List<int> encodeUtf32(String str) =>
* UTF-32BE bytes with no BOM.
*/
List<int> encodeUtf32be(String str, [bool writeBOM = false]) {
- List<int> utf32CodeUnits = stringToCodepoints(str);
+ List<int> utf32CodeUnits = str.charCodes();
List<int> encoding = new List<int>(4 * utf32CodeUnits.length +
(writeBOM ? 4 : 0));
int i = 0;
@@ -120,7 +120,7 @@ List<int> encodeUtf32be(String str, [bool writeBOM = false]) {
* UTF-32BE bytes with no BOM.
*/
List<int> encodeUtf32le(String str, [bool writeBOM = false]) {
- List<int> utf32CodeUnits = stringToCodepoints(str);
+ List<int> utf32CodeUnits = str.charCodes();
List<int> encoding = new List<int>(4 * utf32CodeUnits.length +
(writeBOM ? 4 : 0));
int i = 0;

Powered by Google App Engine
This is Rietveld 408576698