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

Method strip_prefix

crates/wtf8/src/lib.rs:1165–1169  ·  view source on GitHub ↗
(&self, w: impl AsRef<Wtf8>)

Source from the content-addressed store, hash-verified

1163 }
1164
1165 pub fn strip_prefix(&self, w: impl AsRef<Wtf8>) -> Option<&Self> {
1166 self.bytes
1167 .strip_prefix(w.as_ref().as_bytes())
1168 .map(|w| unsafe { Wtf8::from_bytes_unchecked(w) })
1169 }
1170
1171 pub fn strip_suffix(&self, w: impl AsRef<Wtf8>) -> Option<&Self> {
1172 self.bytes

Callers 15

read_homeFunction · 0.80
mainFunction · 0.80
resolve_digestmodFunction · 0.80
hostname_matchesFunction · 0.80
normalize_cipher_nameFunction · 0.80
parseMethod · 0.80
detect_source_encodingFunction · 0.80
type_ignores_from_sourceFunction · 0.80
find_signatureFunction · 0.80
getset_nameMethod · 0.80
slot_nameMethod · 0.80

Calls 3

mapMethod · 0.45
as_bytesMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected