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

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

Issue 212423003: Optimize String.fromCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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: sdk/lib/_internal/lib/core_patch.dart
diff --git a/sdk/lib/_internal/lib/core_patch.dart b/sdk/lib/_internal/lib/core_patch.dart
index 30aa9264d8b96b8f071145c78eae3f3040973a62..926b7795ec79ceb602deeae6e8ccdf51cbed3f7d 100644
--- a/sdk/lib/_internal/lib/core_patch.dart
+++ b/sdk/lib/_internal/lib/core_patch.dart
@@ -219,6 +219,10 @@ patch class String {
return Primitives.stringFromCharCodes(charCodes);
}
+ patch factory String.fromCharCode(int charCode) {
+ return Primitives.stringFromCharCode(charCode);
+ }
+
patch factory String.fromEnvironment(String name, {String defaultValue}) {
throw new UnsupportedError(
'String.fromEnvironment can only be used as a const constructor');

Powered by Google App Engine
This is Rietveld 408576698