pub fn to_linecol(&self, offset: usize) -> (usize, usize) {
        let mut cur = 0;
        for (i, line) in self.input.lines().enumerate() {
            if cur + line.len() + 1 > offset {
                return (i, offset - cur)
            }
            cur += line.len() + 1;
        }
        (self.input.lines().count(), 0)
    }
/// Converts a byte offset from an error message to a (line, column) pair
///
/// All indexes are 0-based.
Converts a byte offset from an error message to a (line, column) pair
All indexes are 0-based.
Converts a byte offset from an error message to a ( line column ) pair All indexes are 0 - based .
pub fn to_linecol(&self, offset: usize) -> (usize, usize) {
        let mut cur = 0;
        for (i, line) in self.input.lines().enumerate() {
            if cur + line.len() + 1 > offset {
                return (i, offset - cur)
            }
            cur += line.len() + 1;
        }
        (self.input.lines().count(), 0)
    }
pub fn to_linecol ( & self , offset : usize ) -> ( usize , usize ) { let mut cur = 0 ; for ( i , line ) in self . input . lines ( ) . enumerate ( ) { if cur + line . len ( ) + 1 > offset { return ( i , offset - cur ) } cur += line . len ( ) + 1 ; } ( self . input . lines ( ) . count ( ) , 0 ) }
Converts a byte offset from an error message to a (line, column) pair
All indexes are 0-based.
Converts a byte offset from an error message to a ( line column ) pair All indexes are 0 - based .
&self
offset
usize
&self
offset
usize