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

Method upper

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

Source from the content-addressed store, hash-verified

720
721 #[pymethod]
722 fn upper(&self) -> Self {
723 match self.as_str_kind() {
724 PyKindStr::Ascii(s) => s.to_ascii_uppercase().into(),
725 PyKindStr::Utf8(s) => s.to_uppercase().into(),
726 PyKindStr::Wtf8(w) => w.to_uppercase().into(),
727 }
728 }
729
730 #[pymethod]
731 fn capitalize(&self) -> Wtf8Buf {

Callers

nothing calls this directly

Calls 3

to_ascii_uppercaseMethod · 0.80
to_uppercaseMethod · 0.80
as_str_kindMethod · 0.45

Tested by

no test coverage detected