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

Method strip_suffix

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

Source from the content-addressed store, hash-verified

1169 }
1170
1171 pub fn strip_suffix(&self, w: impl AsRef<Wtf8>) -> Option<&Self> {
1172 self.bytes
1173 .strip_suffix(w.as_ref().as_bytes())
1174 .map(|w| unsafe { Wtf8::from_bytes_unchecked(w) })
1175 }
1176
1177 pub fn replace(&self, from: &Wtf8, to: &Wtf8) -> Wtf8Buf {
1178 let w = self.bytes.replace(from, to);

Callers 3

format_complex_localeMethod · 0.80
decodeMethod · 0.80
parse_strFunction · 0.80

Calls 3

mapMethod · 0.45
as_bytesMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected