There are several questions that seem to be about the same problem I\'m having. For example see here and here. Basically I\'m trying to build a String
in a loca
Yes you can - the method replace_range
provides a work around -
let a = "0123456789";
//println!("{}",a[3..5]); fails - doesn't have a size known at compile-time
let mut b = String::from(a);
b.replace_range(5..,"");
b.replace_range(0..2,"");
println!("{}",b); //succeeds
It took blood sweat and tears to achieve this!