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

Unified Diff: lib/src/comparators.dart

Issue 2484163002: Fix bug in equalsIgnoreAsciiCase. (Closed)
Patch Set: Address comments, add missing import. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/equality.dart » ('j') | lib/src/equality.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/comparators.dart
diff --git a/lib/src/comparators.dart b/lib/src/comparators.dart
index ca2b3c77772c73b1520b67d6ddd1dd7bce7007a5..b0824a82be5d992cc16e5af0420d9589a9ed48d1 100644
--- a/lib/src/comparators.dart
+++ b/lib/src/comparators.dart
@@ -34,8 +34,8 @@ bool equalsIgnoreAsciiCase(String a, String b) {
if (aChar ^ bChar != _asciiCaseBit) return false;
// If it's possible, then check if either character is actually an ASCII
// letter.
- int aCharUpperCase = aChar | _asciiCaseBit;
- if (_upperCaseA <= aCharUpperCase && aCharUpperCase <= _upperCaseZ) {
+ int aCharLowerCase = aChar | _asciiCaseBit;
+ if (_lowerCaseA <= aCharLowerCase && aCharLowerCase <= _lowerCaseZ) {
continue;
}
return false;
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/equality.dart » ('j') | lib/src/equality.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698