address: fix isMixedCase.
This commit is contained in:
parent
9a2d39c751
commit
8036c301a1
@ -887,10 +887,16 @@ function isMixedCase(str) {
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
let ch = str.charCodeAt(i);
|
||||
|
||||
if (ch & 32)
|
||||
if (ch >= 0x30 && ch <= 0x39)
|
||||
continue;
|
||||
|
||||
if (ch & 32) {
|
||||
assert(ch >= 0x61 && ch <= 0x7a);
|
||||
lower = true;
|
||||
else
|
||||
} else {
|
||||
assert(ch >= 0x41 && ch <= 0x5a);
|
||||
upper = true;
|
||||
}
|
||||
|
||||
if (lower && upper)
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user