Trait SplitFirstChar

Source
pub trait SplitFirstChar<'a>: Sealed + Sized {
    // Required method
    fn split_first_char(self) -> Option<(char, &'a str)>;
}
Expand description

Convenient trait to call split_first_char as a method.

Required Methods§

Source

fn split_first_char(self) -> Option<(char, &'a str)>

Split a string into a pair of first character and the rest.

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<'a> SplitFirstChar<'a> for &'a str

Implementors§