fn parse_header(i : &str) -> (&str, i32) {
    let mut out = (i, "");
    for _x in 0..3 {
        out= not_newline(out.0).unwrap();
    }
    // gets the number of atoms
    let num_atoms : i32 = parse_i32(out.0).unwrap().1;
    // finished parsing the header
    out = not_newline(out.0).unwrap();
    
    (out.0, num_atoms)
}
// parses the first 4 new lines from i
// returns the number of atoms found on line 4
parses the first 4 new lines from i
returns the number of atoms found on line 4
parses the first 4 new lines from i returns the number of atoms found on line 4
fn parse_header(i : &str) -> (&str, i32) {
    let mut out = (i, "");
    for _x in 0..3 {
        out= not_newline(out.0).unwrap();
    }
    // gets the number of atoms
    let num_atoms : i32 = parse_i32(out.0).unwrap().1;
    // finished parsing the header
    out = not_newline(out.0).unwrap();
    (out.0, num_atoms)
}
fn parse_header ( i : & str ) -> ( & str , i32 ) { let mut out = ( i , " " ) ; for _x in 0 .. 3 { out = not_newline ( out . 0 ) . unwrap ( ) ; } // gets the number of atoms let num_atoms : i32 = parse_i32 ( out . 0 ) . unwrap ( ) . 1 ; // finished parsing the header out = not_newline ( out . 0 ) . unwrap ( ) ; ( out . 0 , num_atoms ) }
parses the first 4 new lines from i
returns the number of atoms found on line 4
parses the first 4 new lines from i returns the number of atoms found on line 4
i
&str
i
&str