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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/string_helper.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 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: sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
index 9e2781143417016b136cec3a55cfd62478afc20a..cb8033d6aa402aa4f8b42f50e2d4ead4e9af895b 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
@@ -145,10 +145,10 @@ stringReplaceAllEmptyFuncUnchecked(receiver, onMatch, onNonMatch) {
while (i < length) {
buffer.add(onMatch(new StringMatch(i, receiver, "")));
// Special case to avoid splitting a surrogate pair.
- int code = receiver.charCodeAt(i);
+ int code = receiver.codeUnitAt(i);
if ((code & ~0x3FF) == 0xD800 && length > i + 1) {
// Leading surrogate;
- code = receiver.charCodeAt(i + 1);
+ code = receiver.codeUnitAt(i + 1);
if ((code & ~0x3FF) == 0xDC00) {
// Matching trailing surrogate.
buffer.add(onNonMatch(receiver.substring(i, i + 2)));

Powered by Google App Engine
This is Rietveld 408576698