fn main() {
let str = "hello; mode={"mode":"open"}";
}
how to make this kind of string legit?
fn main() {
let str = "hello; mode={"mode":"open"}";
}
how to make this kind of string legit?
Either escape the quotes:
let str = "hello; mode={\"mode\":\"open\"}";
Or use raw string literals:
let str = r#"hello; mode={"mode":"open"}"#;
template string is what I want, thanks!
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.