Skip to main content

StrExt

Trait StrExt 

Source
pub trait StrExt {
    // Required methods
    fn strip_suffix_ignore_ascii_case(&self, suffix: &str) -> Option<&str>;
    fn ends_with_ignore_ascii_case(&self, suffix: &str) -> bool;
}
Expand description

Extension trait to provide .strip_suffix_ignore_ascii_case() etc.

Required Methods§

Source

fn strip_suffix_ignore_ascii_case(&self, suffix: &str) -> Option<&str>

Like str.strip_suffix() but ASCII-case-insensitive

Source

fn ends_with_ignore_ascii_case(&self, suffix: &str) -> bool

Like str.ends_with() but ASCII-case-insensitive

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StrExt for str

Extension trait to provide .strip_suffix_ignore_ascii_case() etc.

Source§

fn strip_suffix_ignore_ascii_case(&self, suffix: &str) -> Option<&str>

Like str.strip_suffix() but ASCII-case-insensitive

Source§

fn ends_with_ignore_ascii_case(&self, suffix: &str) -> bool

Like str.ends_with() but ASCII-case-insensitive

Implementors§