2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-01-02 07:11:41 -06:00
|
|
|
|
2014-05-22 18:57:53 -05:00
|
|
|
fn parse_args() -> String {
|
2015-02-16 08:04:02 -06:00
|
|
|
let args: Vec<_> = ::std::env::args().collect();
|
2013-01-29 13:44:46 -06:00
|
|
|
let mut n = 0;
|
|
|
|
|
|
|
|
while n < args.len() {
|
2015-02-01 20:53:25 -06:00
|
|
|
match &*args[n] {
|
2014-03-07 15:15:50 -06:00
|
|
|
"-v" => (),
|
2013-01-29 13:44:46 -06:00
|
|
|
s => {
|
2014-05-25 05:17:19 -05:00
|
|
|
return s.to_string();
|
2013-01-29 13:44:46 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
n += 1;
|
|
|
|
}
|
|
|
|
|
2014-05-25 05:17:19 -05:00
|
|
|
return "".to_string()
|
2013-01-29 13:44:46 -06:00
|
|
|
}
|
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2014-01-09 04:06:55 -06:00
|
|
|
println!("{}", parse_args());
|
2013-01-29 13:44:46 -06:00
|
|
|
}
|