StartsWithIgnoreCase

Trait StartsWithIgnoreCase 

Source
pub trait StartsWithIgnoreCase {
    // Required method
    fn starts_with_ignore_case<S: AsRef<str>>(&self, b: S) -> bool;
}
Available on crate feature alloc only.
Expand description

To extend str to have a starts_with_ignore_case method.

Required Methods§

Source

fn starts_with_ignore_case<S: AsRef<str>>(&self, b: S) -> bool

Returns true if the given string slice case-insensitively (using case-folding) matches a prefix of this string slice.

NOTE: This method may allocate heap memory.

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 StartsWithIgnoreCase for str

Implementors§