Trait EndsWithIgnoreAsciiCase

Source
pub trait EndsWithIgnoreAsciiCase {
    // Required methods
    fn ends_with_ignore_ascii_case<S: AsRef<[u8]>>(&self, b: S) -> bool;
    fn ends_with_ignore_ascii_case_with_lowercase<S: AsRef<[u8]>>(
        &self,
        b: S,
    ) -> bool;
    fn ends_with_ignore_ascii_case_with_uppercase<S: AsRef<[u8]>>(
        &self,
        b: S,
    ) -> bool;
}
Expand description

To extend types which implement AsRef<[u8]> to have ends_with_ignore_ascii_case, ends_with_ignore_ascii_case_with_lowercase and ends_with_ignore_ascii_case_with_uppercase methods.

Required Methods§

Source

fn ends_with_ignore_ascii_case<S: AsRef<[u8]>>(&self, b: S) -> bool

Returns true if the given string slice case-insensitively (only ignoring ASCII case) matches a suffix of this string slice.

Source

fn ends_with_ignore_ascii_case_with_lowercase<S: AsRef<[u8]>>( &self, b: S, ) -> bool

Returns true if the given lowercase string slice case-insensitively (only ignoring ASCII case) matches a suffix of this string slice.

Source

fn ends_with_ignore_ascii_case_with_uppercase<S: AsRef<[u8]>>( &self, b: S, ) -> bool

Returns true if the given uppercase string slice case-insensitively (only ignoring ASCII case) matches a suffix of this string slice.

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.

Implementors§