#Eattened quotation marks

2 messages · Page 1 of 1 (latest)

fallow tusk
#
use std::env;
fn main() {
    // Prints each argument on a separate line
    for argument in env::args() {
        println!("{argument}");
    }
}
cargo run "ss"

the output is

ss
lime dove
#

The quotation marks on the command line are not part of the information that is passed to the program. There is no difference between cargo run -- ss and cargo run -- "ss", or even cargo run -- "s"s