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

Unified Diff: lib/utf/utf.dart

Issue 9462001: Unify most of our utf8 implementations. This takes the implementation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
Index: lib/utf/utf.dart
===================================================================
--- lib/utf/utf.dart (revision 4552)
+++ lib/utf/utf.dart (working copy)
@@ -2,36 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#library("unicode");
-#import("unicode_core.dart");
-
-/**
- * Provide a list of Unicode codepoints for a given string.
- */
-List<int> stringToCodepoints(String str) {
- List<int> codepoints;
- // TODO is16BitCodeUnit() is used to work around a bug with frog/dartc
- // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
- // removing after this issue is resolved.
- if (is16BitCodeUnit()) {
- codepoints = utf16CodeUnitsToCodepoints(str.charCodes());
- } else {
- codepoints = str.charCodes();
- }
- return codepoints;
-}
-
-/**
- * Generate a string from the provided Unicode codepoints.
- */
-String codepointsToString(List<int> codepoints) {
- // TODO is16BitCodeUnit() is used to work around a bug with frog/dartc
- // (http://code.google.com/p/dart/issues/detail?id=1357). Consider
- // removing after this issue is resolved.
- if (is16BitCodeUnit()) {
- return new String.fromCharCodes(
- codepointsToUtf16CodeUnits(codepoints));
- } else {
- return new String.fromCharCodes(codepoints);
- }
-}
+#library("utf");
+#source("utf_core.dart");
+#source("utf8.dart");
+#source("utf16.dart");
+#source("utf32.dart");
« frog/file_system_vm.dart ('K') | « lib/utf/unicode_core.dart ('k') | lib/utf/utf16.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698