StripPrefixOrSelf

Trait StripPrefixOrSelf 

Source
pub trait StripPrefixOrSelf {
    // Required method
    fn strip_prefix_or_self<P: AsRef<str>>(&self, prefix: P) -> &str;
}

Required Methods§

Source

fn strip_prefix_or_self<P: AsRef<str>>(&self, prefix: P) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StripPrefixOrSelf for str

Source§

fn strip_prefix_or_self<P: AsRef<str>>(&self, prefix: P) -> &str

Implementors§