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

Method removesuffix

crates/vm/src/builtins/str.rs:940–944  ·  view source on GitHub ↗
(&self, suffix: PyStrRef)

Source from the content-addressed store, hash-verified

938
939 #[pymethod]
940 fn removesuffix(&self, suffix: PyStrRef) -> Wtf8Buf {
941 self.as_wtf8()
942 .py_removesuffix(suffix.as_wtf8(), suffix.byte_len(), |s, p| s.ends_with(p))
943 .to_owned()
944 }
945
946 #[pymethod]
947 fn isalnum(&self) -> bool {

Callers

nothing calls this directly

Calls 5

py_removesuffixMethod · 0.80
ends_withMethod · 0.80
to_ownedMethod · 0.45
as_wtf8Method · 0.45
byte_lenMethod · 0.45

Tested by

no test coverage detected