pub fn pop_newline<T>(input: T) -> String
where
    T: std::string::ToString,
{
    let mut output = input.to_string();
    if output.ends_with('\n') {
        output.pop();
    }

    output
}
/**
This function pops `\n` from the end of a given `String` if it is found.

This can come in handy when reading the contents of a file that might
contain a newline control character at the end of the line.

Files of this kind are very common on GNU/Linux systems.
*/
This function pops `\n` from the end of a given `String` if it is found.
This can come in handy when reading the contents of a file that might
contain a newline control character at the end of the line.

Files of this kind are very common on GNU/Linux systems.
This function pops ` \ n ` from the end of a given ` String ` if it is found . This can come in handy when reading the contents of a file that might contain a newline control character at the end of the line . Files of this kind are very common on GNU / Linux systems .
pub fn pop_newline<T>(input: T) -> String
where
    T: std::string::ToString,
{
    let mut output = input.to_string();
    if output.ends_with('\n') {
        output.pop();
    }
    output
}
pub fn pop_newline < T > ( input : T ) -> String where T : std :: string :: ToString , { let mut output = input . to_string ( ) ; if output . ends_with ( '\n' ) { output . pop ( ) ; } output }
This function pops `\n` from the end of a given `String` if it is found.
This function pops ` \ n ` from the end of a given ` String ` if it is found .
input
T
input
T