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

Method lower

crates/vm/src/builtins/str.rs:696–702  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

694
695 #[pymethod]
696 fn lower(&self) -> Self {
697 match self.as_str_kind() {
698 PyKindStr::Ascii(s) => s.to_ascii_lowercase().into(),
699 PyKindStr::Utf8(s) => s.to_lowercase().into(),
700 PyKindStr::Wtf8(w) => w.to_lowercase().into(),
701 }
702 }
703
704 // casefold is much more aggressive than lower
705 #[pymethod]

Callers

nothing calls this directly

Calls 3

to_ascii_lowercaseMethod · 0.80
to_lowercaseMethod · 0.80
as_str_kindMethod · 0.45

Tested by

no test coverage detected