split_first_char

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> SplitFirstChar<'a> for &'a str

Implementors§