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

Side by Side Diff: runtime/lib/string_base.dart

Issue 12441003: Rename String.concat to operator+. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * [_StringBase] contains common methods used by concrete String 6 * [_StringBase] contains common methods used by concrete String
7 * implementations, e.g., _OneByteString. 7 * implementations, e.g., _OneByteString.
8 */ 8 */
9 class _StringBase { 9 class _StringBase {
10 10
(...skipping 21 matching lines...) Expand all
32 String operator [](int index) native "String_charAt"; 32 String operator [](int index) native "String_charAt";
33 33
34 int codeUnitAt(int index) native "String_codeUnitAt"; 34 int codeUnitAt(int index) native "String_codeUnitAt";
35 35
36 int get length native "String_getLength"; 36 int get length native "String_getLength";
37 37
38 bool get isEmpty { 38 bool get isEmpty {
39 return this.length == 0; 39 return this.length == 0;
40 } 40 }
41 41
42 String concat(String other) native "String_concat"; 42 String operator +(String other) native "String_concat";
43
44 String concat(String other) => this + other;
43 45
44 String toString() { 46 String toString() {
45 return this; 47 return this;
46 } 48 }
47 49
48 bool operator ==(Object other) { 50 bool operator ==(Object other) {
49 if (identical(this, other)) { 51 if (identical(this, other)) {
50 return true; 52 return true;
51 } 53 }
52 if ((other is !String) || 54 if ((other is !String) ||
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 for (int g in groups) { 599 for (int g in groups) {
598 result.add(group(g)); 600 result.add(group(g));
599 } 601 }
600 return result; 602 return result;
601 } 603 }
602 604
603 final int start; 605 final int start;
604 final String str; 606 final String str;
605 final String pattern; 607 final String pattern;
606 } 608 }
OLDNEW
« no previous file with comments | « runtime/lib/invocation_mirror_patch.dart ('k') | runtime/tests/vm/dart/inline_stack_frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698