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

Side by Side Diff: lib/src/comparators.dart

Issue 1638163002: Modernize the package's style. (Closed) Base URL: git@github.com:dart-lang/collection@master
Patch Set: Code review changes Created 4 years, 10 months 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
« no previous file with comments | « lib/src/canonicalized_map.dart ('k') | lib/src/equality.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.pkg.collection.comparators;
6
7 // Character constants. 5 // Character constants.
8 const int _zero = 0x30; 6 const int _zero = 0x30;
9 const int _upperCaseA = 0x41; 7 const int _upperCaseA = 0x41;
10 const int _upperCaseZ = 0x5a; 8 const int _upperCaseZ = 0x5a;
11 const int _lowerCaseA = 0x61; 9 const int _lowerCaseA = 0x61;
12 const int _lowerCaseZ = 0x7a; 10 const int _lowerCaseZ = 0x7a;
13 const int _asciiCaseBit = 0x20; 11 const int _asciiCaseBit = 0x20;
14 12
15 /// Checks if strings [a] and [b] differ only on the case of ASCII letters. 13 /// Checks if strings [a] and [b] differ only on the case of ASCII letters.
16 /// 14 ///
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 /// If there is no non-zero digits before, then leading zeros at [index] 388 /// If there is no non-zero digits before, then leading zeros at [index]
391 /// are also ignored when comparing numerically. If there is a non-zero digit 389 /// are also ignored when comparing numerically. If there is a non-zero digit
392 /// before, then zeros at [index] are significant. 390 /// before, then zeros at [index] are significant.
393 bool _isNonZeroNumberSuffix(String string, int index) { 391 bool _isNonZeroNumberSuffix(String string, int index) {
394 while (--index >= 0) { 392 while (--index >= 0) {
395 int char = string.codeUnitAt(index); 393 int char = string.codeUnitAt(index);
396 if (char != _zero) return _isDigit(char); 394 if (char != _zero) return _isDigit(char);
397 } 395 }
398 return false; 396 return false;
399 } 397 }
OLDNEW
« no previous file with comments | « lib/src/canonicalized_map.dart ('k') | lib/src/equality.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698