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

Unified Diff: bin/dartutils.h

Issue 11275008: - Represent strings internally in UTF-16 format, this makes it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | « bin/crypto.cc ('k') | bin/dartutils.cc » ('j') | bin/dartutils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/dartutils.h
===================================================================
--- bin/dartutils.h (revision 14155)
+++ bin/dartutils.h (working copy)
@@ -110,6 +110,13 @@
// Create a new Dart OSError object with the provided OS error.
static Dart_Handle NewDartOSError(OSError* os_error);
+ // Create a new Dart String object from a C String.
+ static Dart_Handle NewString(const char* str) {
+ ASSERT((str != NULL) && (strlen(str) != 0));
+ return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str),
+ strlen(str));
+ }
+
static void SetOriginalWorkingDirectory();
// Global state that stores the original working directory..
« no previous file with comments | « bin/crypto.cc ('k') | bin/dartutils.cc » ('j') | bin/dartutils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698