fn trim_newline(s: &mut String) -> String {
    if s.ends_with('\n') {
        s.pop();
        if s.ends_with('\r') {
            s.pop();
        }
    }
    s.to_string()
}
// Trim newline characters for buffer input
Trim newline characters for buffer input
Trim newline characters for buffer input
fn trim_newline(s: &mut String) -> String {
    if s.ends_with('\n') {
        s.pop();
        if s.ends_with('\r') {
            s.pop();
        }
    }
    s.to_string()
}
fn trim_newline ( s : & mut String ) -> String { if s . ends_with ( '\n' ) { s . pop ( ) ; if s . ends_with ( '\r' ) { s . pop ( ) ; } } s . to_string ( ) }
Trim newline characters for buffer input
Trim newline characters for buffer input
s
&mut String
s
&mut String