| OLD | NEW |
| 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 function native_StringImplementation__indexOperator(index) { | 5 function native_StringImplementation__indexOperator(index) { |
| 6 return this[index]; | 6 return this[index]; |
| 7 } | 7 } |
| 8 | 8 |
| 9 function native_StringImplementation__charCodeAt(index) { | 9 function native_StringImplementation__charCodeAt(index) { |
| 10 return this.charCodeAt(index); | 10 return this.charCodeAt(index); |
| 11 } | 11 } |
| 12 | 12 |
| 13 function native_StringImplementation_get$length() { | 13 function native_StringImplementation_get$length() { |
| 14 return this.length; | 14 return this.length; |
| 15 } | 15 } |
| 16 | 16 |
| 17 function native_StringImplementation_EQ(other) { | 17 function native_StringImplementation_EQ(other) { |
| 18 return typeof other == 'string' && this == other; | 18 return typeof other == 'string' && this == other; |
| 19 } | 19 } |
| 20 | 20 |
| 21 function native_StringImplementation_indexOf(other, startIndex) { | 21 function native_StringImplementation__nativeIndexOf(other, startIndex) { |
| 22 return this.indexOf(other, startIndex); | 22 return this.indexOf(other, startIndex); |
| 23 } | 23 } |
| 24 | 24 |
| 25 function native_StringImplementation_lastIndexOf(other, fromIndex) { | 25 function native_StringImplementation__nativeLastIndexOf(other, fromIndex) { |
| 26 if (other == "") { | 26 if (other == "") { |
| 27 return Math.min(this.length, fromIndex); | 27 return Math.min(this.length, fromIndex); |
| 28 } | 28 } |
| 29 return this.lastIndexOf(other, fromIndex); | 29 return this.lastIndexOf(other, fromIndex); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function native_StringImplementation_concat(other) { | 32 function native_StringImplementation_concat(other) { |
| 33 return this.concat(other); | 33 return this.concat(other); |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 array = tmp; | 118 array = tmp; |
| 119 } | 119 } |
| 120 return String.fromCharCode.apply(this, array); | 120 return String.fromCharCode.apply(this, array); |
| 121 } | 121 } |
| 122 | 122 |
| 123 // Deprecated old name of new String.fromValues(..). | 123 // Deprecated old name of new String.fromValues(..). |
| 124 function native_StringBase_createFromCharCodes(array) { | 124 function native_StringBase_createFromCharCodes(array) { |
| 125 return native_StringImplementation__newFromValues(array); | 125 return native_StringImplementation__newFromValues(array); |
| 126 } | 126 } |
| OLD | NEW |