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

Method lstrip

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

Source from the content-addressed store, hash-verified

614 }
615
616 pub fn lstrip(&self, chars: OptionalOption<Self>) -> &[u8] {
617 self.elements.py_strip(
618 chars,
619 |s, chars| s.trim_start_with(|c| chars.contains(&(c as u8))),
620 |s| s.trim_start(),
621 )
622 }
623
624 pub fn rstrip(&self, chars: OptionalOption<Self>) -> &[u8] {
625 self.elements.py_strip(

Callers 7

builtin_str.pyFile · 0.45
builtin_bytes.pyFile · 0.45
parse_requirementFunction · 0.45
get_versionsFunction · 0.45
_slotnamesFunction · 0.45
cache_from_sourceFunction · 0.45

Calls 3

py_stripMethod · 0.80
trim_startMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected