File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1713,21 +1713,21 @@ abstract static class IsLowerNode extends PythonUnaryBuiltinNode {
1713
1713
@ Specialization
1714
1714
@ TruffleBoundary
1715
1715
boolean doString (String self ) {
1716
- int spaces = 0 ;
1716
+ int uncased = 0 ;
1717
1717
if (self .length () == 0 ) {
1718
1718
return false ;
1719
1719
}
1720
1720
for (int i = 0 ; i < self .length (); i ++) {
1721
1721
int codePoint = self .codePointAt (i );
1722
1722
if (!Character .isLowerCase (codePoint )) {
1723
- if (Character .isWhitespace (codePoint )) {
1724
- spaces ++;
1723
+ if (Character .toLowerCase ( codePoint ) == Character . toUpperCase (codePoint )) {
1724
+ uncased ++;
1725
1725
} else {
1726
1726
return false ;
1727
1727
}
1728
1728
}
1729
1729
}
1730
- return spaces == 0 || self .length () > spaces ;
1730
+ return uncased == 0 || self .length () > uncased ;
1731
1731
}
1732
1732
}
1733
1733
You can’t perform that action at this time.
0 commit comments