Is it possible to write something like:
fn main() {
let my_string: &str = \"Testing for new lines \\
might work like this?\";
Every line is a multiline in Rust.
But if you have indents in your text like:
fn my_func() {
const MY_CONST: &str = "\
Hi!
This is a multiline text!
";
}
But you will get unnecessary spaces. To remove them you can use indoc!
macros from indoc
crate to remove all indents: https://github.com/dtolnay/indoc