conventions.io

Tech Challenge

2026-09-05

🦀

Daily Tech Challenge

Rust

medium
Question 1 of 5

What does this program print, mutating a String with remove, insert and insert_str?

Example
fn main() {
    let mut s = String::from("hello");
    let c = s.remove(1);
    s.insert(0, 'J');
    s.insert_str(2, "--");
    println!("{} {}", c, s);
}

Saturday, September 5, 2026 · A new challenge drops every day