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 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 295 |
296 List<String> splitChars() { | 296 List<String> splitChars() { |
297 int len = this.length; | 297 int len = this.length; |
298 final result = new List<String>(len); | 298 final result = new List<String>(len); |
299 for (int i = 0; i < len; i++) { | 299 for (int i = 0; i < len; i++) { |
300 result[i] = this[i]; | 300 result[i] = this[i]; |
301 } | 301 } |
302 return result; | 302 return result; |
303 } | 303 } |
304 | 304 |
305 List<int> charCodes() { | 305 List<int> get charCodes { |
306 int len = this.length; | 306 int len = this.length; |
307 final result = new List<int>(len); | 307 final result = new List<int>(len); |
308 for (int i = 0; i < len; i++) { | 308 for (int i = 0; i < len; i++) { |
309 result[i] = this.charCodeAt(i); | 309 result[i] = this.charCodeAt(i); |
310 } | 310 } |
311 return result; | 311 return result; |
312 } | 312 } |
313 | 313 |
314 String toUpperCase() native "String_toUpperCase"; | 314 String toUpperCase() native "String_toUpperCase"; |
315 | 315 |
(...skipping 163 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 |