pub fn read_next_line(&mut self) -> &str {
        if self.offset >= self.input.len() {
            panic!("could not read line from input file: reached end of file");
        }
        let start = self.offset;
        let end = self.input
            .char_indices()
            .skip(start)
            .take_while(|&(_, c)| c != '\n')
            .last()
            .map_or(start, |(i, _)| i + 1);
        let s = &self.input[start..end];
        if s.is_empty() {
            self.offset = end + 2;
        } else {
            self.offset = end + 1;
        }
        s
    }
/// Reads a line of text from the input file, consuming the end-of-line marker if one is
/// present.
Reads a line of text from the input file, consuming the end-of-line marker if one is
present.
Reads a line of text from the input file consuming the end - of - line marker if one is present .
pub fn read_next_line(&mut self) -> &str {
        if self.offset >= self.input.len() {
            panic!("could not read line from input file: reached end of file");
        }
        let start = self.offset;
        let end = self.input
            .char_indices()
            .skip(start)
            .take_while(|&(_, c)| c != '\n')
            .last()
            .map_or(start, |(i, _)| i + 1);
        let s = &self.input[start..end];
        if s.is_empty() {
            self.offset = end + 2;
        } else {
            self.offset = end + 1;
        }
        s
    }
pub fn read_next_line ( & mut self ) -> & str { if self . offset >= self . input . len ( ) { panic ! ( " " ) ; } let start = self . offset ; let end = self . input . char_indices ( ) . skip ( start ) . take_while ( | & ( _ , c ) | c != '\n' ) . last ( ) . map_or ( start , | ( i , _ ) | i + 1 ) ; let s = & self . input [ start .. end ] ; if s . is_empty ( ) { self . offset = end + 2 ; } else { self . offset = end + 1 ; } s }
Reads a line of text from the input file, consuming the end-of-line marker if one is
present.
Reads a line of text from the input file consuming the end - of - line marker if one is present .
&mut self
&mut self