pub fn consume_while<F>(&mut self, test: F) -> String
    where
        F: Fn(char) -> bool,
    {
        let mut result = String::new();
        while !self.eof() && test(self.next_char()) {
            result.push(self.consume_char());
        }

        result
    }
/// Consumes characters until `test` returns false.
Consumes characters until `test` returns false.
Consumes characters until ` test ` returns false .
pub fn consume_while<F>(&mut self, test: F) -> String
    where
        F: Fn(char) -> bool,
    {
        let mut result = String::new();
        while !self.eof() && test(self.next_char()) {
            result.push(self.consume_char());
        }
        result
    }
pub fn consume_while < F > ( & mut self , test : F ) -> String where F : Fn ( char ) -> bool , { let mut result = String :: new ( ) ; while ! self . eof ( ) && test ( self . next_char ( ) ) { result . push ( self . consume_char ( ) ) ; } result }
Consumes characters until `test` returns false.
Consumes characters until ` test ` returns false .
&mut self
test
F
&mut self
test
F