MCPcopy Index your code
hub / github.com/RustPython/RustPython / py_islower

Method py_islower

crates/vm/src/anystr.rs:405–415  ·  view source on GitHub ↗

Unified form of CPython functions: _Py_bytes_islower unicode_islower_impl

(&self)

Source from the content-addressed store, hash-verified

403 // _Py_bytes_islower
404 // unicode_islower_impl
405 fn py_islower(&self) -> bool {
406 let mut lower = false;
407 for c in self.elements() {
408 if c.is_uppercase() {
409 return false;
410 } else if !lower && c.is_lowercase() {
411 lower = true
412 }
413 }
414 lower
415 }
416
417 // Unified form of CPython functions:
418 // Py_bytes_isupper

Callers 2

islowerMethod · 0.80
islowerMethod · 0.80

Implementers 2

bytes_inner.rscrates/vm/src/bytes_inner.rs
str.rscrates/vm/src/builtins/str.rs

Calls 3

elementsMethod · 0.45
is_uppercaseMethod · 0.45
is_lowercaseMethod · 0.45

Tested by

no test coverage detected