fn main() {
    let mut string = String::new();
    
    // append a char
    string.push('a');
    
    // append a &str
    string.push_str("bcde");

    // convert String to &str
    let str: &str = &string;    
    
    println!("{}", str);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: