Unified form of CPython functions: Py_bytes_isupper unicode_isupper_impl
(&self)
| 418 | // Py_bytes_isupper |
| 419 | // unicode_isupper_impl |
| 420 | fn py_isupper(&self) -> bool { |
| 421 | let mut upper = false; |
| 422 | for c in self.elements() { |
| 423 | if c.is_lowercase() { |
| 424 | return false; |
| 425 | } else if !upper && c.is_uppercase() { |
| 426 | upper = true |
| 427 | } |
| 428 | } |
| 429 | upper |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | /// Tests that the predicate is True on a single value, or if the value is a tuple a tuple, then |
no test coverage detected