fn add_prefix(text: String, prefix: impl Display) -> String {
    text.lines()
        .map(|line| format!("{}{}", prefix, line))
        .collect::<Vec<_>>()
        .join("\n")
}
/// Add prefix to every line in a string.
Add prefix to every line in a string.
Add prefix to every line in a string .
fn add_prefix(text: String, prefix: impl Display) -> String {
    text.lines()
        .map(|line| format!("{}{}", prefix, line))
        .collect::<Vec<_>>()
        .join("\n")
}
fn add_prefix ( text : String , prefix : impl Display ) -> String { text . lines ( ) . map ( | line | format ! ( " " prefix line ) ) . collect :: < Vec < _ > > ( ) . join ( " \n " ) }
Add prefix to every line in a string.
Add prefix to every line in a string .
text
String
prefix
impl Display
text
String
prefix
impl Display