1
0
Fork 0

prompt(1) in rust

This commit is contained in:
dtb 2023-10-31 23:00:55 -06:00
parent ba05e57b72
commit db840af366
1 changed files with 9 additions and 0 deletions

9
echo/prompt.rs Normal file
View File

@ -0,0 +1,9 @@
use std::env::args;
fn main() { // cannot do non UTF-8 strings as far as I know
if args().collect::<Vec<String>>().len() >= 2 {
for argument in args().skip(1) {
print!("{} ", argument);
}
}
}