Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: sdk/lib/utf/utf32.dart

Issue 11419032: Switch libraries to using new tags. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tip of tree. Changed library names to dart.x Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/utf/utf16.dart ('k') | sdk/lib/utf/utf8.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of dart.utf;
6
5 /** 7 /**
6 * Decodes the UTF-32 bytes as an iterable. Thus, the consumer can only convert 8 * Decodes the UTF-32 bytes as an iterable. Thus, the consumer can only convert
7 * as much of the input as needed. Determines the byte order from the BOM, 9 * as much of the input as needed. Determines the byte order from the BOM,
8 * or uses big-endian as a default. This method always strips a leading BOM. 10 * or uses big-endian as a default. This method always strips a leading BOM.
9 * Set the replacementCharacter to null to throw an ArgumentError 11 * Set the replacementCharacter to null to throw an ArgumentError
10 * rather than replace the bad value. 12 * rather than replace the bad value.
11 */ 13 */
12 IterableUtf32Decoder decodeUtf32AsIterable(List<int> bytes, [ 14 IterableUtf32Decoder decodeUtf32AsIterable(List<int> bytes, [
13 int offset = 0, int length, 15 int offset = 0, int length,
14 int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) { 16 int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 value += (utf32EncodedBytesIterator.next() << 24); 312 value += (utf32EncodedBytesIterator.next() << 24);
311 return value; 313 return value;
312 } 314 }
313 } 315 }
314 316
315 bool _validCodepoint(int codepoint) { 317 bool _validCodepoint(int codepoint) {
316 return (codepoint >= 0 && codepoint < UNICODE_UTF16_RESERVED_LO) || 318 return (codepoint >= 0 && codepoint < UNICODE_UTF16_RESERVED_LO) ||
317 (codepoint > UNICODE_UTF16_RESERVED_HI && 319 (codepoint > UNICODE_UTF16_RESERVED_HI &&
318 codepoint < UNICODE_VALID_RANGE_MAX); 320 codepoint < UNICODE_VALID_RANGE_MAX);
319 } 321 }
OLDNEW
« no previous file with comments | « sdk/lib/utf/utf16.dart ('k') | sdk/lib/utf/utf8.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698