consume_while

Function consume_while 

Source
pub fn consume_while<'s>(
    input: &mut &'s str,
    predicate: impl FnMut(&char) -> bool,
) -> &'s str
Expand description

Consume a prefix of input while the predicate returns true, returning that slice.