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

Side by Side Diff: runtime/lib/string.cc

Issue 8333001: Implement case mapping using the Unicode default case mapping algorithm. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renamed result string variables. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/string.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h" 8 #include "vm/native_entry.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 GrowableArray<const Object*> args; 133 GrowableArray<const Object*> args;
134 Exceptions::ThrowByType(Exceptions::kIllegalArgument, args); 134 Exceptions::ThrowByType(Exceptions::kIllegalArgument, args);
135 } 135 }
136 String& b = String::Handle(); 136 String& b = String::Handle();
137 b ^= b_instance.raw(); 137 b ^= b_instance.raw();
138 const String& result = String::Handle(String::Concat(a, b)); 138 const String& result = String::Handle(String::Concat(a, b));
139 arguments->SetReturn(result); 139 arguments->SetReturn(result);
140 } 140 }
141 141
142 142
143 DEFINE_NATIVE_ENTRY(String_toLowerCase, 1) {
144 const String& str = String::CheckedHandle(arguments->At(0));
145 ASSERT(!str.IsNull());
146 const String& result = String::Handle(String::ToLowerCase(str));
147 arguments->SetReturn(result);
148 }
149
150
151 DEFINE_NATIVE_ENTRY(String_toUpperCase, 1) {
152 const String& str = String::CheckedHandle(arguments->At(0));
153 ASSERT(!str.IsNull());
154 const String& result = String::Handle(String::ToUpperCase(str));
155 arguments->SetReturn(result);
156 }
157
158
143 DEFINE_NATIVE_ENTRY(Strings_concatAll, 1) { 159 DEFINE_NATIVE_ENTRY(Strings_concatAll, 1) {
144 const Array& strings = Array::CheckedHandle(arguments->At(0)); 160 const Array& strings = Array::CheckedHandle(arguments->At(0));
145 ASSERT(!strings.IsNull()); 161 ASSERT(!strings.IsNull());
146 const String& result = String::Handle(String::ConcatAll(strings)); 162 const String& result = String::Handle(String::ConcatAll(strings));
147 arguments->SetReturn(result); 163 arguments->SetReturn(result);
148 } 164 }
149 165
150 } // namespace dart 166 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698