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

Side by Side Diff: sdk/lib/utf/utf8.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/utf32.dart ('k') | sdk/lib/utf/utf_core.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 const int _UTF8_ONE_BYTE_MAX = 0x7f; 7 const int _UTF8_ONE_BYTE_MAX = 0x7f;
6 const int _UTF8_TWO_BYTE_MAX = 0x7ff; 8 const int _UTF8_TWO_BYTE_MAX = 0x7ff;
7 const int _UTF8_THREE_BYTE_MAX = 0xffff; 9 const int _UTF8_THREE_BYTE_MAX = 0xffff;
8 10
9 const int _UTF8_LO_SIX_BIT_MASK = 0x3f; 11 const int _UTF8_LO_SIX_BIT_MASK = 0x3f;
10 12
11 const int _UTF8_FIRST_BYTE_OF_TWO_BASE = 0xc0; 13 const int _UTF8_FIRST_BYTE_OF_TWO_BASE = 0xc0;
12 const int _UTF8_FIRST_BYTE_OF_THREE_BASE = 0xe0; 14 const int _UTF8_FIRST_BYTE_OF_THREE_BASE = 0xe0;
13 const int _UTF8_FIRST_BYTE_OF_FOUR_BASE = 0xf0; 15 const int _UTF8_FIRST_BYTE_OF_FOUR_BASE = 0xf0;
14 const int _UTF8_FIRST_BYTE_OF_FIVE_BASE = 0xf8; 16 const int _UTF8_FIRST_BYTE_OF_FIVE_BASE = 0xf8;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (validSequence && nonOverlong && inRange) { 253 if (validSequence && nonOverlong && inRange) {
252 return value; 254 return value;
253 } else if (replacementCodepoint != null) { 255 } else if (replacementCodepoint != null) {
254 return replacementCodepoint; 256 return replacementCodepoint;
255 } else { 257 } else {
256 throw new ArgumentError( 258 throw new ArgumentError(
257 "Invalid UTF8 at ${utf8EncodedBytesIterator.position - j}"); 259 "Invalid UTF8 at ${utf8EncodedBytesIterator.position - j}");
258 } 260 }
259 } 261 }
260 } 262 }
OLDNEW
« no previous file with comments | « sdk/lib/utf/utf32.dart ('k') | sdk/lib/utf/utf_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698