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

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

Issue 23464040: Remove String.concat from implementation classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | sdk/lib/_internal/lib/js_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) 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 patch class String { 5 patch class String {
6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) { 6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) {
7 return _StringBase.createFromCharCodes(charCodes); 7 return _StringBase.createFromCharCodes(charCodes);
8 } 8 }
9 } 9 }
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 int get length native "String_getLength"; 67 int get length native "String_getLength";
68 68
69 bool get isEmpty { 69 bool get isEmpty {
70 return this.length == 0; 70 return this.length == 0;
71 } 71 }
72 72
73 bool get isNotEmpty => !isEmpty; 73 bool get isNotEmpty => !isEmpty;
74 74
75 String operator +(String other) native "String_concat"; 75 String operator +(String other) native "String_concat";
76 76
77 String concat(String other) => this + other;
78
79 String toString() { 77 String toString() {
80 return this; 78 return this;
81 } 79 }
82 80
83 bool operator ==(Object other) { 81 bool operator ==(Object other) {
84 if (identical(this, other)) { 82 if (identical(this, other)) {
85 return true; 83 return true;
86 } 84 }
87 if ((other is !String) || 85 if ((other is !String) ||
88 (this.length != other.length)) { 86 (this.length != other.length)) {
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 class _CodeUnits extends Object with ListMixin<int>, 634 class _CodeUnits extends Object with ListMixin<int>,
637 UnmodifiableListMixin<int> { 635 UnmodifiableListMixin<int> {
638 /** The string that this is the code units of. */ 636 /** The string that this is the code units of. */
639 String _string; 637 String _string;
640 638
641 _CodeUnits(this._string); 639 _CodeUnits(this._string);
642 640
643 int get length => _string.length; 641 int get length => _string.length;
644 int operator[](int i) => _string.codeUnitAt(i); 642 int operator[](int i) => _string.codeUnitAt(i);
645 } 643 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698