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 * Support for encoding and decoding Unicode characters in UTF-8, UTF-16, and | 6 * Support for encoding and decoding Unicode characters in UTF-8, UTF-16, and |
7 * UTF-32. | 7 * UTF-32. |
8 */ | 8 */ |
9 library utf; | 9 library utf; |
| 10 |
10 import "dart:async"; | 11 import "dart:async"; |
11 import "dart:collection"; | 12 import "dart:collection"; |
| 13 |
12 part "utf_stream.dart"; | 14 part "utf_stream.dart"; |
13 part "utf8.dart"; | 15 part "utf8.dart"; |
14 part "utf16.dart"; | 16 part "utf16.dart"; |
15 part "utf32.dart"; | 17 part "utf32.dart"; |
16 | 18 |
17 // TODO(jmesserly): would be nice to have this on String (dartbug.com/6501). | 19 // TODO(jmesserly): would be nice to have this on String (dartbug.com/6501). |
18 /** | 20 /** |
19 * Provide a list of Unicode codepoints for a given string. | 21 * Provide a list of Unicode codepoints for a given string. |
20 */ | 22 */ |
21 List<int> stringToCodepoints(String str) { | 23 List<int> stringToCodepoints(String str) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 _offset -= by; | 262 _offset -= by; |
261 } | 263 } |
262 | 264 |
263 int get remaining => _end - _offset - 1; | 265 int get remaining => _end - _offset - 1; |
264 | 266 |
265 void skip([int count = 1]) { | 267 void skip([int count = 1]) { |
266 _offset += count; | 268 _offset += count; |
267 } | 269 } |
268 } | 270 } |
269 | 271 |
OLD | NEW |