Function take_while

Source
pub fn take_while(s: &str, pred: impl Fn(char) -> bool) -> (&str, &str)