fn char_offset_for_line(&self, line_num: usize, source: &str) -> (usize, usize) {
        let mut char_for_line: usize = 0;
        let mut char_following_line: usize = 0;
        for (n, line) in source.lines().enumerate() {
            if n == line_num {
                char_following_line += line.len() + 1;
                break;
            }
            char_for_line += line.len() + 1;
            char_following_line = char_for_line;
        }
        (char_for_line, char_following_line)
    }
// returns the character offset + 1 of the end of line number `line` and the character
// offset + 1 for the end of the line after the previous one
returns the character offset + 1 of the end of line number `line` and the character
offset + 1 for the end of the line after the previous one
returns the character offset + 1 of the end of line number ` line ` and the character offset + 1 for the end of the line after the previous one
fn char_offset_for_line(&self, line_num: usize, source: &str) -> (usize, usize) {
        let mut char_for_line: usize = 0;
        let mut char_following_line: usize = 0;
        for (n, line) in source.lines().enumerate() {
            if n == line_num {
                char_following_line += line.len() + 1;
                break;
            }
            char_for_line += line.len() + 1;
            char_following_line = char_for_line;
        }
        (char_for_line, char_following_line)
    }
fn char_offset_for_line ( & self , line_num : usize , source : & str ) -> ( usize , usize ) { let mut char_for_line : usize = 0 ; let mut char_following_line : usize = 0 ; for ( n , line ) in source . lines ( ) . enumerate ( ) { if n == line_num { char_following_line += line . len ( ) + 1 ; break ; } char_for_line += line . len ( ) + 1 ; char_following_line = char_for_line ; } ( char_for_line , char_following_line ) }
returns the character offset + 1 of the end of line number `line` and the character
offset + 1 for the end of the line after the previous one
returns the character offset + 1 of the end of line number ` line ` and the character offset + 1 for the end of the line after the previous one
&self
line_num
usize
source
&str
&self
line_num
usize
source
&str