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 library dart._internal; | 5 library dart._internal; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'dart:core' hide Symbol; | 9 import 'dart:core' hide Symbol; |
10 import 'dart:core' as core; | 10 import 'dart:core' as core; |
(...skipping 27 matching lines...) Expand all Loading... |
38 100000000000000.0, | 38 100000000000000.0, |
39 1000000000000000.0, /* 15 */ | 39 1000000000000000.0, /* 15 */ |
40 10000000000000000.0, | 40 10000000000000000.0, |
41 100000000000000000.0, | 41 100000000000000000.0, |
42 1000000000000000000.0, | 42 1000000000000000000.0, |
43 10000000000000000000.0, | 43 10000000000000000000.0, |
44 100000000000000000000.0, /* 20 */ | 44 100000000000000000000.0, /* 20 */ |
45 1000000000000000000000.0, | 45 1000000000000000000000.0, |
46 10000000000000000000000.0, | 46 10000000000000000000000.0, |
47 ]; | 47 ]; |
| 48 |
| 49 /** |
| 50 * An [Iterable] of the UTF-16 code units of a [String] in index order. |
| 51 */ |
| 52 class CodeUnits extends UnmodifiableListBase<int> { |
| 53 /** The string that this is the code units of. */ |
| 54 final String _string; |
| 55 |
| 56 CodeUnits(this._string); |
| 57 |
| 58 int get length => _string.length; |
| 59 int operator[](int i) => _string.codeUnitAt(i); |
| 60 |
| 61 static String stringOf(CodeUnits u) => u._string; |
| 62 } |
OLD | NEW |