| 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 | 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 |
| 11 factory _StringBase._uninstantiable() { | 11 factory _StringBase._uninstantiable() { |
| 12 throw const UnsupportedOperationException( | 12 throw const UnsupportedOperationException( |
| 13 "_StringBase can't be instaniated"); | 13 "_StringBase can't be instaniated"); |
| 14 } | 14 } |
| 15 | 15 |
| 16 int hashCode() native "String_hashCode"; | 16 int get hashCode native "String_getHashCode"; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Create the most efficient string representation for specified | 19 * Create the most efficient string representation for specified |
| 20 * [codePoints]. | 20 * [codePoints]. |
| 21 */ | 21 */ |
| 22 static String createFromCharCodes(List<int> charCodes) { | 22 static String createFromCharCodes(List<int> charCodes) { |
| 23 _ObjectArray objectArray; | 23 _ObjectArray objectArray; |
| 24 if (charCodes is _ObjectArray) { | 24 if (charCodes is _ObjectArray) { |
| 25 objectArray = charCodes; | 25 objectArray = charCodes; |
| 26 } else { | 26 } else { |
| (...skipping 452 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 |