Question : rust const string
Answered by : snefden-applications
// construction:
// const name : type = value
fn main() { const TEXT : &str = "Hallo Welt!"; // little test print!("{}", TEXT);
}
// Important to know:
// The type must be specified, because alternatively an error occurs when compiling.
Source : | Last Update : Tue, 05 Apr 22