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

Unified Diff: runtime/vm/symbols.cc

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: runtime/vm/symbols.cc
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 35729643a3d3fc2059087ae0e2a12f251845062a..afd2808a68660bfde22974ec130cf02ec0a397e2 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -98,7 +98,7 @@ RawString* Symbols::New(const char* str) {
Utf8::Type type;
intptr_t str_len = strlen(str);
const uint8_t* utf8_array = reinterpret_cast<const uint8_t*>(str);
- intptr_t len = Utf8::CodePointCount(utf8_array, str_len, &type);
+ intptr_t len = Utf8::CodeUnitCount(utf8_array, str_len, &type);
Zone* zone = Isolate::Current()->current_zone();
if (len == 0) {
return Symbols::New(reinterpret_cast<uint8_t*>(NULL), 0);

Powered by Google App Engine
This is Rietveld 408576698