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

Method rstrip

crates/vm/src/bytes_inner.rs:624–630  ·  view source on GitHub ↗
(&self, chars: OptionalOption<Self>)

Source from the content-addressed store, hash-verified

622 }
623
624 pub fn rstrip(&self, chars: OptionalOption<Self>) -> &[u8] {
625 self.elements.py_strip(
626 chars,
627 |s, chars| s.trim_end_with(|c| chars.contains(&(c as u8))),
628 |s| s.trim_end(),
629 )
630 }
631
632 // new in Python 3.9
633 pub fn removeprefix(&self, prefix: Self) -> Vec<u8> {

Callers 8

builtin_str.pyFile · 0.45
builtin_bytes.pyFile · 0.45
stdlib_sys.pyFile · 0.45
_lib_prefix_strippedFunction · 0.45
_iter_patch_linesFunction · 0.45
_path_joinFunction · 0.45
source_from_cacheFunction · 0.45

Calls 3

py_stripMethod · 0.80
trim_endMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected