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

Method removesuffix

crates/vm/src/bytes_inner.rs:642–648  ·  view source on GitHub ↗

new in Python 3.9

(&self, suffix: Self)

Source from the content-addressed store, hash-verified

640
641 // new in Python 3.9
642 pub fn removesuffix(&self, suffix: Self) -> Vec<u8> {
643 self.elements
644 .py_removesuffix(&suffix.elements, suffix.elements.len(), |s, p| {
645 s.ends_with(p)
646 })
647 .to_vec()
648 }
649
650 pub fn split<F>(
651 &self,

Callers 5

test_removesuffixFunction · 0.45
test_removesuffix_typesFunction · 0.45
compute_test_todo_listFunction · 0.45
visit_CallMethod · 0.45
resolve_test_to_libFunction · 0.45

Calls 4

to_vecMethod · 0.80
py_removesuffixMethod · 0.80
ends_withMethod · 0.80
lenMethod · 0.45

Tested by 2

test_removesuffixFunction · 0.36
test_removesuffix_typesFunction · 0.36