| OLD | NEW |
| 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 implementations, | 6 * [StringBase] contains common methods used by concrete String implementations, |
| 7 * e.g., OneByteString. | 7 * e.g., OneByteString. |
| 8 */ | 8 */ |
| 9 class StringBase { | 9 class StringBase { |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 return _createFromCodePoints(objectArray); | 33 return _createFromCodePoints(objectArray); |
| 34 } | 34 } |
| 35 | 35 |
| 36 static String _createFromCodePoints(ObjectArray<int> codePoints) | 36 static String _createFromCodePoints(ObjectArray<int> codePoints) |
| 37 native "StringBase_createFromCodePoints"; | 37 native "StringBase_createFromCodePoints"; |
| 38 | 38 |
| 39 String operator [](int index) native "String_charAt"; | 39 String operator [](int index) native "String_charAt"; |
| 40 | 40 |
| 41 int charCodeAt(int index) native "String_charCodeAt"; | 41 int charCodeAt(int index) native "String_charCodeAt"; |
| 42 | 42 |
| 43 int get length() native "String_getLength"; | 43 int get length native "String_getLength"; |
| 44 | 44 |
| 45 bool isEmpty() { | 45 bool isEmpty() { |
| 46 return this.length === 0; | 46 return this.length === 0; |
| 47 } | 47 } |
| 48 | 48 |
| 49 String concat(String other) native "String_concat"; | 49 String concat(String other) native "String_concat"; |
| 50 | 50 |
| 51 String toString() { | 51 String toString() { |
| 52 return this; | 52 return this; |
| 53 } | 53 } |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 for (int g in groups) { | 479 for (int g in groups) { |
| 480 result.add(group(g)); | 480 result.add(group(g)); |
| 481 } | 481 } |
| 482 return result; | 482 return result; |
| 483 } | 483 } |
| 484 | 484 |
| 485 final int _start; | 485 final int _start; |
| 486 final String str; | 486 final String str; |
| 487 final String pattern; | 487 final String pattern; |
| 488 } | 488 } |
| OLD | NEW |